Pregunta de entrevista de Infosys

pallindrome question for the technical round