Solve the min queue to provide offer/poll/min operations in O(1).