Cognizant interview question

Palindrome coding question was asked.