Infosys interview question

One puzzle