Infosys Interview Question

Explain the code you wrote during the pen and paper round.