Infosys interview question

basic coding questions