Why this is giving right for some and wrong for some?

hello @dhruvilcodes

i think u have misunderstood the problem.
u only have to compress the consecutive same character.

for example->
input-> aaabbccaab
output -> a3b2c2a2b1

1 Like

oh kay i will try for consecutive thank you for clearing my doubt

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.