Primary
Priority Queue ○꠹|Definition|1st|20260704124452-00-⌔
Priority queue
In computer science, a priority queue is an abstract data type similar to a regular queue where each element has an associated priority determining its order of service.1 Priority queue serves highest priority items first.1 Priority values have to be instances of an ordered data type, and higher priority can be given either to the lesser or to the greater values with respect to the given order relation. For example, in the Java standard library, the PriorityQueue class considers the lowest element with respect to their order as having the highest priority.2
While priority queues are often implemented using heaps, they are conceptually distinct. A priority queue can be implemented with a heap or with other methods; just as a list can be implemented with a linked list or with an array.
Printed 2026-07-04.
(echo:: @ ᯤ)
Link to original Footnotes
Secondary
• • •