Infosys interview question

Nothing difficult.