Microsoft interview question

Q: Given a string, write a function to determine if it is a palindrome.