String max frequency problem1

1 test case is showing wrong answer
code @https://ide.codingblocks.com/s/93698

@mohit_99 hey Mohit your code is not handling for the case like this
b
your code doesn’t print anything.

Thank you very much!!