🔵 🔵 🔵


Primary

၊၊||၊|။

Priority Queue ○꠹|Definition|1st|20260704124452-00-⌔

Priority queue - Wikipedia

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:: @ )

Footnotes

  1. Miller Jr., Robert G. (1960). “Priority queues” (PDF). The Annals of Mathematical Statistics. 31. Stanford University: 86–103. doi:10.1214/aoms/1177705990. 2

  2. “PriorityQueue (Java SE 9 & JDK 9)”. docs.oracle.com. Retrieved 2025-03-13.

Link to original

Secondary

• • •