PriorityQueue ADT

A Priority Queue is a variation of a standard queue where instead of being a "first-in-first-out" data structure, values come out in order of highest priority.

The "priority" by default is based on the natural ordering of the elements. If priority is same for two elements then they are removed (dequeued) on the basis of first come first serve.

In this chapter, we will explore a very interesting data structure called binary heap that enables us to efficiently implement PriorityQueue ADT.