why are there few cases failing
String max frequency
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.