Pergunta de entrevista da empresa General Motors (GM)

Write an algorithm to tell if a string is a palindrome.