One test case fail in problem string max frequency character

Here is my code: https://ide.codingblocks.com/s/205869

What is missing in this?

You logic is wrong.
Maintain a frequency count of each character in an array. And finally print the character with maximum frequency.

Consider as case:
bbbbaaacbaaa

You o/p:
b

Expected o/p
a

I think my logic is right when I sorting the string before entering into my function

my updated code: https://ide.codingblocks.com/s/207118

Is you code passing the test cases?

You should try using hashing concepts. It will be more efficient than sorting.

yes it pass all the test cases