Not getting mistake in SWAPPALI in Feb Lunchtime

https://www.codechef.com/viewsolution/29981397

Maybe this testcase will help you:
1
6
baabaa
answer:
YES
2

2 Likes

yes. got the mistake. Thanks @v1ncent