String max frequency


why are there few cases failing

Hi @yyashu123

upper and lower bound functions work correctly only on sorted arrays. Hence add a statement sort(s,s+n) before if(n>=1 && n<=1000) statement and then your code should work just fine.

Hope it Helps.

@yyashu123
Please mark your doubt as solved.