String compression


one test case is getting failed

Hi @mehak61
Your code is failing that case in which length of a character is greater than 9. For example :
aaaaaaaaaaaaaaaggg
for this input you code is printing a?g3 but its correct output is a15g3
Try to handle this type of test cases then you code will pass all the test cases.

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.