Infosys interview question

based on project