Discussion About Strings-String Compression

@Amogh_Agarwal tell me the problem you are facing?
Bcoz You have already submitted the code.

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.

only test case 4 is passing

hey @Amogh_Agarwal there is a problem with your logic Theq question consecutive same characters should be mentioned with a number. BUT YOU FORGOT THE POINT THAT YOU DONT HAVE TO PRINT THE NO. OF OCCURECENCES OF THAT Char in whole string just print consecutive.
For example : str = aabbaa
correct answer should be “a2b2a2”(Note a is written twice)
but your logic gives “a4b2” change your logic accordingly.

my code is accepted but it is not marked as complete

@Amogh_Agarwal It might be bcoz you may have opened the editorial.

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.

can you please check my code

@Amogh_Agarwal Send me your code