WA TASHIFT

Can somebody please help and tell me at which point of code I am doing wrong?If somebody atleast give me a test case for which I am getting WA then also it will be helpful?
My code-CodeChef: Practical coding for everyone


10
aaaabbbbbb
aaaaaaaabb

Answer should be 4. Your code gives me 5.

1 Like

give the link to your code