Question d’entretien chez Infosys

Coding question simply asked to solve