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.
I don't know if it is a right approach. Let me know guys if i can improve on this.
Time Complexity: O(N), where N is the length of the string. not adding other functions runtime 'cause they are just loop through constant size frequency table of size 26.
Sherlock and the Valid String
You are viewing a single comment's thread. Return to all comments →
I don't know if it is a right approach. Let me know guys if i can improve on this. Time Complexity:
O(N)
, whereN
is the length of the string. not adding other functions runtime 'cause they are just loop through constant size frequency table of size26
.