Professional Documents
Culture Documents
Binary Heap
Priority Queue
• A Priority Queue removes items based on a priority instead of
the order in which they were added to the queue
• This allows an item that has higher priority to move ahead of
others in line that have lower priority
• Ensuring that High priority items go first means that low
priority items might never get selected if higher priority items
are continuously added to the Priority Queue.
• The priority for Items in the Queue can be increased the
longer they are in the queue so that all items eventually get
serviced.
Priority Queue Methods