Collection - Priority Queue


A priority queue is a queue where the first element to be retrieved is an element that has the highest priority attribute.


  • An element with high priority is served before an element with low priority.
  • If two elements have the same priority, they are served according to the order in which they were enqueued


Priority Queue are implemented generally with a heap structure

Powered by ComboStrap