Cognizant interview question

Palindrome coding was very tough