Arrange character frequecy pls check my answer

https://ide.codingblocks.com/s/345267 this is the question
https://ide.codingblocks.com/s/345269 this is the solution its not giving correct output. pls check my code as soon as possible.pls…

hi @shrutikatyal i think there are some characters missing in the question, do you have a screenshot of the question?

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.