Samsung Electronics interview question

Write a function to find if a string is a palindrome.