Max freq in a string

only two test cases didn’t run can you please tell me what is wrong with my code https://ide.codingblocks.com/s/136864

I have edited your code, try to submit now,