https://ide.codingblocks.com/s/55893
test case 2and 3 not passed
String Compression(check)
Hi Shubham, you need to compress only those similar characters which appear consecutively.
For example,
Input: aaabbccds
Output: a3b2c2d1s1
Your code works fine for this. But consider the following:
Input: aabbaacc
Expected Output: a2b2a2c2
Your Output: a4a4
Hey Shubham, as you are not responding to this thread, I am marking your doubt as Resolved for now. Re-open it if required.
Please mark your doubts as resolved in your course’s “Ask Doubt” section, when your doubt is resolved.