videos
Slides
- pre lecture 0 slides
- lecture 0 slides
- pre lecture 1 slides
- lecture 1 slides
- lecture 2 slides
- no new video
- pre lecture 3 slides
- lecture 3 slides
- pre lecture 4 slides
- lecture 4 slides
Demos
Huffman demos
MST demos
Prim's algorithm
pqdict save as pqdict/__init__.py
Kruskal's algorithn
Kruskal's Algorithm
- You also need disjoint set data structure
Kruskal's Algorithm on larger input
Union Find demos
union by rank - u.b.r. with path compression
Reading
- CLRS4 §15.3 (Huffman)
- CLRS4 §21.1 (MST: crossing property)
- CLRS4 §21.2 (MST: Prim and Kruskal)
- https://jeffe.cs.illinois.edu/teaching/algorithms/book/04-greedy.pdf
- Huffman Coding is covered in §4.4
- CLRS4 §19.3, §19.4 Union Find Forests