Pregunta de entrevista de Tata Consultancy Services

Basic java question like tree and palindrome