Max frequency characters test case

in this problem i was getting exact output as required but one test case is not passing . can you tell me where am i going wrong ?

hello @Raghavsingla522
if there exist more than one character whose frequency is maximum then print smaller one.
for example if a and b has maximum frequency then print a

how can i implement the code for the same ?

replace ur if with this.
image

i have tried your suggested change but now it is not giving any output.

ok let me check . . . . .

image
increase ur count array size to 256 (because total 256 characters are there )
also initiailse it with 0.

done . but still no effect on output

please share ur updated code using cb ide

check ur updated code here -> https://ide.codingblocks.com/s/246986

ok @aman212yadav it has passed all the test cases now . thanks man !!

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.