The Linux Foundation Projects
Skip to main content

Priority Queue

An abstract data type which is like a regular queue or stack data structure, but where additionally each element has a ‘priority’ associated with it. In a priority queue, an element with high priority is served before an element with low priority. In some implementations, if two elements have the same priority, they are served according to the order in which they were enqueued, while in other implementations, ordering of elements with the same priority is undefined.