Infosys interview question

From basic to advanced