Google interview question

Write an algorithm that takes in a string and returns whether the string is a palindrome or not.