Infosys interview question

No difficulty.