I have checckedd over all possible test cases but on submitting it is always thwroing wrong answer.
StringCompression
Hey @Debugger,
Please share your code. It would be easier for me to detect the mistake.
Steps:
- Paste your code on https://ide.codingblocks.com/
- Save it there.
- Share the URL generated.
Moreover, you can check for the following common mistakes:
-
If you are using an array then the size of that might be shorter and does not satisfies the constraints given in the question.
-
The understanding of compression:
Example:
aaabbaacc
Expected Output:
a3b2a2c2
Your Output:
a5b2c2
Hope, this would help.
Give a like if you are satisfied.
Hey @Debugger,
I have already specified the error in my previous reply.
Please read the second point and correct your code for that.
Let me if you face any issue.
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.