Lectures

Below are links to the lecture slides. All the video lectures are available on Princeton Salon. Those lectures marked with a "*" (star) are optional.
# DUE SLIDES SECTION STUDY DEMOS VIDEOS
1 Monday
3/26
 Geometric Applications of BSTs  

guide
Kd tree Geometric Applications Video
2 Wednesday
3/28
 Hash Tables  
3.4
guide
Linear probing Hash Tables Video
3 Monday
4/2
 Undirected Graphs  
4.1
guide
DFS
BFS
Undirected Graphs Video
4 Monday
4/2
 Directed Graphs  
4.2
guide
DFS
Topological sort
Directed Graphs Video
5 Wednesday
4/4
 Minimum Spanning Trees  
4.3
guide
Kruskal
Prim
MST Video
6 Monday
4/9
 Shortest Paths  
4.4
guide
Bellman–Ford
Dijkstra
Topological Sort
Shortest Path Video
7 Wednesday
4/11
 Max Flows and Min Cuts  
6.4
guide
Ford–Fulkerson Max Flows Video
8 Monday
4/16
 Tries  
5.2
guide
Trie
TST
Tries Video
9 Wednesday
4/18
 Substring Search  
5.3
guide
KMP Substring Search Video
10 Wednesday
4/18
 Regular Expressions  
5.4
guide
NFA simulation
NFA construction
Regular Expressions Video
11 Monday
4/23
 String Sorts  
5.1
guide
Key-indexed counting String Sorts Video
12 Wednesday
4/25
 Data Compression  
5.5
guide
Huffman
LZW
Data Compression Video
13 Monday
4/30
 Exam (Part 1) 
Possibly a programming exam
- -
14 Wednesday
5/02
 Exam (Part 2) 
McGraw study guide
- -
The lectures below are from the first half of the semester.
15 Monday
2/5
 Union–Find  
1.5
guide
Quick-find
Quick-union
Weighted quick-union
Union-Find Videos
16 Wednesday
2/7
 Analysis of Algorithms  
1.4
guide
Binary search Analysis of Algorithms Videos
17 Monday
2/12
 Stacks and Queues  
1.3
guide
Stacks and Queues Videos
18 Wednesday
2/14
 Elementary Sorts  
2.1
guide
Selection
Insertion
Shuffle
Elementary Sorts Video
19 Monday
2/19
 Mergesort  
2.2
guide
Merging Mergesort Video
20 Wednesday
2/21
 Quicksort  
2.3
guide
Partitioning
Quick-select
Quicksort Video
21 Monday
2/26
 Priority Queues  
2.4
guide
Heap
Heapsort
Priority Queue Video
22 Wednesday
2/28
 Elementary Symbol Tables  
 BSTs  
3.1
3.2
guide
guide
BST Elementary Symbol Tables Video
23 Monday
3/5
 Balanced Search Trees  
3.3
guide
2–3 tree
Red–black BST
Balanced Search Trees Video
24 Wednesday
3/7
 No video lecture 
 
 
25 Monday
3/12
 Midterm Exam 
McGraw study guide
   
26 Wednesday
3/14
 No video lecture 
 
 

Readings.All readings refer to Algorithms, 4th edition by R. Sedgewick and K. Wayne unless otherwise specified.

Study guide. Associated with each lecture is a study guide, which summarizes the most important topics and ideas from the lecture. It also includes optional (and ungraded) exercises.

Advice. In general, slides are intended for the lecture presentations and do not provide thorough descriptions of the material alone; for reference, read the indicated sections from Algorithms, 4th edition. An effective strategy is to skim the textbook before the lecture, read it thoroughly soon afterwards, complete the corresponding Quizzera quiz (and perhaps some additional B-level exercises from the study guide).

Errata. Here is a list of known errors in the lecture slides and textbook.