Infosys interview question

Situation scenario