My code fails 1 test case

here is my code:


it fails test case 1 and i can’t figure out what’s the problem

@Garvit012
your code will not work if count of any alphabet is greater than 9. Let consider this tescase
“aaaaaaaaaaa”
ans should be “a11” but your code is printing “a<” this is because count is 11 here and count+=‘0’ will be ‘<’ not ‘11’.

thankyouu for your help it passes now

@Garvit012
mark it as resolved. thankyou :slight_smile:

i have already marked it as resolved can you please check and confirm

1 Like