String Compression Question

What is the missing condition in the code as two of my testcases aren’t passing?

Hey @Sakshi2004
You misunderstood the question
For input

aabbbaaaacc
Output will be
a2b3a4c2

that is you have to compress consecutive chars

Ok Thankyou. Got it now and done.

1 Like