Pregunta de entrevista de Amazon Web Services

Palindrome question for the coding