What is point i m lacking

i have passed 2 testcases and 2 testcases failed i extended the question to all variety of ASCII values yet in vain pls help
HELP

Hey Divyansh, copy your code on ide, save it and share the link. Also share the problem’s link, So that we can help you to rectify your code.

https://ide.codingblocks.com/s/46672
SIR this is code and here i tried all possibility but then also 2 testcases failed.
HELP

Please add the problem link as well.

actually i solve on online coding blocks itself not on hacker blocks.
https://online.codingblocks.com/player/9180/content/4744?s=1623

the statement is

Take as input S, a string. Write a function that does basic string compression. Print the value returned. E.g. for input “aaabbccds” print out a3b2c2d1s1.

Hey Divyansh, check your code for this case :
input:
aaggxsxssyy

your code’s output :
a2g2x2s3y2

but the correct output should be : a2g2x1s1x1s2y2

so if a character is occurring at more than 1 place in the string you have to print its different count at different positions.

Hope this helps you :slight_smile: