2 TEST CASES WRONG

Please help why 2 test cases are wrong

@Prakhar_Nagpal check for input aba ans is a1b1a1 and your o/p a2b1.
if your doubt gets cleared dont forget to hit like and mark resolved :smiley:

Please check again its giving a2b1 only…Kindly provide a resolution https://ide.codingblocks.com/s/252435

@Prakhar_Nagpal yes your output a2b1 but answer is a1b1a1 so here correct logic code


just counting while iterating and keep printing