Infosys interview question

Basic CS questions