Pergunta de entrevista da empresa Tata Consultancy Services

coding test for one question