FAST interview question

Write an isPalindrome function.