Getting WA:PRPALN

Can somebody please tell me the test case for which am I getting wrong answer?I have tried many cases but still I am not getting the correct answer.
My code-:http://www.codechef.com/viewsolution/5290806

Your code fails for this input

hadadaha

It becomes a palindrome on deleting last character ‘a’, so answer is “YES”. But your code outputs “NO”.

2 Likes

@vinayawsm Thanks…

1 Like