A heap is a balanced binary tree
Shape of Heap:
Highest priority at root
perfectly balanced
Heap the word:
a type of binary tree
priority queue where priorities are integers
allocated memory
Sifting Up (adding elements)
Swapping(Sifting) Down (removing elements O(log n))
In practice:
stack unbounded
queues can be either
priority queues are often bounded
Table of Content