Infosys interview question

Arrays