Strings-string compression


one test case fails…whats wrong in my code???..

@D18LP0080
Test Case: aba
Your Ouput: a2b
Expected Output: aba
You are just counting and printing the counted characters,which is not going to work.
Hint:Count till you are getting same character.
Hit like if i gave a satisfactorily explanation to your doubt else ask your doubts freely.