Infosys interview question

Mainly technical