2 test case pass and 2 test case is failing.
String Compression
Hi @prashant7122
Your code is getting wrong output for cases like :
aaaabbbccaa
Here your output is a6b3c2
But correct output should be a4b3c2a2
1 Like
Hi @prashant7122
Here is your correct and simplified code :
If your doubt is clear then mark it as resolved.
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.