getting testcase 1 and 2 wrong
String compression
@Rakshitgarg99
Hello Rakshit ,
consider this example
aaabbaa
actual output should be a3b2a2 but ur code will give output a5b2 .
to rectify it check only consecutive characters
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.
Hi @Rakshitgarg99 you have to compress the alphabets that are present next to each other. Not every character in the string. For eg, the output for aabbccaa should be a2b2c2a2 but your program is giving output as a4b2c2 did you understand your mistake?
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.