Pregunta de entrevista de Epic

Palindrome coding question need to solve