Infosys interview question

Normal array question and me mongodb