Infosys interview question

Quite simple