How much did u score
I scored 150 (1st 100, 2nd 50) but I didnāt used suffix trees/LCP array for 1st one, did this https://bit.ly/2ZMrXhV
It passes all of the cases of 1st question really because it have comlexity of O(n^2).
the test cases of 1st question is weakā¦my solution is brute force O(n2 log(n)) and it get 100ptsā¦
Iām with @abdullah768 all the time after the coding roundā¦ he is too simple and down to earth person ā¦really nice to meet himā¦
Bro can u tell me your approach for 1st question.
Hey bro tells me one thing the link which u mentioned above the code passes 100 marksā¦really
bcz your code maps the substring in lexicographical order.
Is this in the question is mentioned that map the distinct substring in lexicographical order an then count the distinct char in each?
Can you share the que with me ?
By using MAP I store only distinct substrings (Since only 1 value exists corresponding to a Key)
I also merged the calculation of distinct characters in the substring generation part and the value part of MAP stores the count, eg: MAP[āappleā]=4
Also MAP stores the keys in lexicographical order.
No but is it mentioned to map the values in lexicographical order.
Yes MAP<string,int> automatically does that; it stores the key-value pair in lexicographical order (Key).
MAP<int,int> stores items in ascending order of Key(s)
UNORDERED MAP/HASH MAP doesnāt.
are yaar ye to pata hai par us question me ye kaha tha kya ki sorted order me hi map karna hai.
@ssrivastava990 u have not yet shared ur experience of code gladiators finale experience ,i actually wanted to see what i missed (especially any goodies etc)
Thanks in advance man ā¦!!!