Heaps & HeapSort

Heaps are super-useful for their applications. After we've talked about trees, (specifically BSTs) we get to see that the heap property is simpler to maintain.

Heaps vs. Binary Search Trees (3:36)

Min-heaps and Max-heaps (1:40)

Heaps are stored in ArrayLists (3:05)

Heap Insert (1:59)

Heap Sift-Up Code (2:10)

Heap Remove (Sift-Down) Ex. 1 (1:18)

Heap Remove (SiftDown) Ex. 2 (1:18)

Heap Sift-Down Code (3:35)

HeapSort (4:30)

PriorityQueue Complexity (2:13)

Heap Applications: Priority Queue (4:15)