Pergunta de entrevista da empresa First Republic

Write a function to check if a string is a palindrome. Don't use the reverse() method.