Max frequency of character


why one test case is not passing ?

hi @divyam_13 do it in 2 passes, first make the frequency array by traversing the string.
Then traverse the frequency array to find the character with the highest frequency

abbbaaa

for this input the output should be a but your output is b

this case is passing on a offine ide but not here why ?

@divyam_13 follow the logic i explained above, the logic remains the same you just have to do in 2 passes

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.