Pergunta de entrevista da empresa Infosys

We were given a problem statement and asked to implement it using any programming language we know.