Given a sorted string "aaabbbccccccceeee" and a character, write a function to return the frequency of character. Time Complexity expected was O(logN) and Space complexity O(1).
How to solve this?
Comments (10)
Given a sorted string "aaabbbccccccceeee" and a character, write a function to return the frequency of character. Time Complexity expected was O(logN) and Space complexity O(1).
How to solve this?