Sample output is given wrong

The question says to compress string likewise if string is abc then output must be abc and not a1b1c1 as we have to compress it and not expand but in sample output frequency of 1 characters are also shown as in given sample aaabbcd output must be a3b2cd but given sample output is a3b2c1d1…please resolve this query i have completed my code but not able to pass the test cases

hi @rohankashyap834 refer