Pregunta de entrevista de Horizontal

Palindrome question and code for the same