Infosys interview question

programming related