Chevron interview question

How to code a Palindrome