Heaps
What is a Heap?
- Notes on heaps here
Two Types of Heaps
Different Applications of Heaps:
-
Heap Sort
-
Priority Queues
Priority Queues
Is a collection of prioritized elements that allow arbitrary element insertion, and allows the removal of the element that has first priority. When an element is added to a priority queue, the user is designate its priority by providing an associated key. The element with the minimum key will be the next to be removed from the Queue.
Example:
An airplane may be full, and in-order to decided who on the waiting list is next available might rely on other things then those who arrived first, like airline points