Amazon interview question

max in an array, course schedule