We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
no. little bit change. not store frequency, bcz you will end storing max occurance of that char in string. what we need is length of continous substring, so better you store max length ( for continuous substring) for each char. and you will end up having linear time. not even lienr-ish. check this code.
Weighted Uniform Strings
You are viewing a single comment's thread. Return to all comments →
no. little bit change. not store frequency, bcz you will end storing max occurance of that char in string. what we need is length of continous substring, so better you store max length ( for continuous substring) for each char. and you will end up having linear time. not even lienr-ish. check this code.