Amazon interview question

Find min and max from the array