Infosys interview question

nothing too difficult