Do you know of a popular library (Apache, Google, etc, collections) which has a reliable Java implementation for a min-max heap, that is a heap which allows to peek its minimum and maximum value in O(1) and to remove an element in O(log n)?
O(1)
O(log n)
From Guava: MinMaxPriorityQueue.
MinMaxPriorityQueue
1.4m articles
1.4m replys
5 comments
57.0k users