Doubt in Strings-Max Frequency

Three test cases are getting failed.
Here’s my code - https://ide.codingblocks.com/s/381530

at line no 16
for loop should run till 26
bec you are iterating in freq array whose length is 26 not n
correct statement
for(int i=0; i<26; i++){

Modified Code

i hope this help
if your doubt is resolved plz mark it as resolved

My bad, thank you! It’s clear now.

If your doubt is resolved ,plz mark it as resolved from your side

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.