Infosys interview question

Technical