Infosys interview question

This round is purely based on coding