Domanda di colloquio di Infosys

Coding question simply asked to solve