Pregunta de entrevista de Tata Consultancy Services

Explain the code which you solved in Codevita