What are they:
This is another Abstract Data Structure, where elements are stored in such a way that elements with
higher priority are “served” before other elements with lower priority. What does this mean?
Example
Imagine having a bunch of elements you want to store. Attach a priority group to each item. Then store them in a way such that their priority is respected (I.E. If storing by Linked Lists, each element could be held sequentially by priority).
In the below example, each element (denoted ) is stored with a (denoted ) as their priority group.
Operations:
- ExtractMax(): Finds element with max priority in the priority queue, returns it and deletes it from the queue.
- ChangeKey(): Changes the key:value of element to