The developers of Hackerland are working on an array reduction algorithm that takes in an array of n integers say arr and does the following until the array arr is empty:
(a) removes the largest element in the array at each step
(b) removes the smallest element in the array at each step
(c) removes every alternate element in the array at each step
(d) reverses the order of elements in the array at each step