String compression

code fails 2 test cases -

Hey @mahima you have to do corresponding compression, for eg:
with input: aaabbbccaaaccddda
Output should be: a3b3c2a3c2d3a1
Yours is giving is: a7b3c4a7c4d3a7

is there any solution video available for this problem? I am not able to understand the solution provided

You can understand it from here
Code is in java , if you don’t have c++ code for it. You can also ask me that.

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.