MinMaxStack to find the minimum and maximum in O(1)