Infosys interview question

Find the first and second maximum of an array in one loop