Skip to main content

One doc tagged with "PriorityQueue"

View all tags

Priority Queue Data Structure

A priority queue is an abstract data type similar to a regular queue or stack data structure, but with an added feature that allows each element to have a priority. In a priority queue, elements are served based on their priority rather than their order in the queue.