Pregunta de entrevista de Tata Consultancy Services

coding test for one question