Sollicitatievraag bij Tata Consultancy Services

Explain the code which you solved in Codevita