Infosys interview question

not sure, its been long time!