the generic type of key on this priority queue
Construct priority queue.
comparator for the queue elements.
true if this queue should be MaxPriorityQueue, and false if this queue should be MinPriorityQueue. Default value is true.
elements to put in this queue. Default value is empty array.
comparator for the queue elements.
true if this queue should be MaxPriorityQueue, and false if this queue should be MinPriorityQueue. Default value is true.
Generated using TypeDoc
This implementation uses a binary heap. The enqueue and dequeue operations take logarithmic amortized time. The peek, size, and is-empty operations take constant time. Construction takes time proportional to the specified capacity or the number of items used to initialize the data structure.
iterator operation takes time proportional to the current size or the queue.
For additional documentation, see Section 2.4 of Algorithms, 4th Edition by Robert Sedgewick and Kevin Wayne.