2 Test Cases are not passing, Please tell Why?

2 Test Cases are not passing, Please tell Why?

Hello @cbcao263,

Your code is failing for testcases like:
aabba
Expected Output:
a2b2a1
Your Output:
a3b2

Hope, this would help.
Give a like if you are satisfied.

Then I think I should change the logic for that. Or with this logic, It will gonna work.

Yes @cbcao263.

Try to improve it.

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.