from 5 test cases 3 test cases are passed by my code
Two test cases are not passed
problem is with finding char with max freq
in loop you have done some logic mistake
i hope now you understand but
if you have more doubts regarding this feel free to ask
if your doubt is resolved mark it as resolved from your doubt section inside your course