Infosys interview question

Question based on the type of scenario.