Lectures

This table contains links to the lecture slides.
# DATE SLIDES SECTION STUDY DEMOS
1 Tuesday
1/25
 Introduction  
 Union–Find  
1.5
guide
Quick-union
Weighted quick-union
2 Thursday
1/27
 Analysis of Algorithms  
1.4
guide
3 Tuesday
2/1
 Stacks and Queues  
1.3
guide
Function-call stack
Resizing-array queue
4 Thursday
2/3
 Advanced Java  

guide
5 Tuesday
2/8
 Elementary Sorts  
2.1
guide
Selection sort
Insertion sort
Binary search
6 Thursday
2/10
 Mergesort  
2.2
guide
Merging
7 Tuesday
2/15
 Quicksort  
2.3
guide
2-way partitioning
3-way partitioning
Quickselect
8 Thursday
2/17
 Priority Queues  
2.4
guide
Heap operations
9 Tuesday
2/22
 Elementary Symbol Tables  
 BSTs  
3.1
3.2
guide
guide
BST operations
10 Thursday
2/24
 Balanced Search Trees  
3.3
guide
2–3 trees
Red–black BSTs
11 Tuesday
3/1
 Midterm Review 

12 Thursday
3/3
 Midterm 

13 Tuesday
3/15
 Geometric Applications of BSTs  

guide
Line segment intersection
K-d trees
14 Thursday
3/17
 Hash Tables  
3.4
guide
Linear probing
15 Tuesday
3/22
 Graphs and Digraphs I  
4.1
4.2
guide
Directed DFS
Directed paths
Undirected DFS
16 Thursday
3/24
 Graphs and Digraphs II  
4.1
4.2
guide
Directed BFS
Topological sort
17 Tuesday
3/29
 Minimum Spanning Trees  
4.3
guide
Kruskal
Prim
18 Thursday
3/31
 Shortest Paths  
4.4
guide
Bellman–Ford
Dijkstra
19 Tuesday
4/5
 Dynamic Programming  
IntroCS
guide
20 Thursday
4/7
 Maxflows and Mincuts  
6.4
guide
Ford–Fulkerson
21 Tuesday
4/12
 String Sorts  
5.1
guide
Key-indexed counting
22 Thursday
4/14
 Tries  
5.2
guide
Tries
Ternary search tries
23 Tuesday
4/19
 Data Compression  
5.5
guide
Huffman
LZW
24 Thursday
4/21
 Algorithm Design  

guide

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.

You are welcome to discuss solutions to the exercises with classmates or on the course discussion forum.

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

iClickers. To make the lectures more interactive, we will be using iClickers. To earn participation credit, you must attend lecture, participate in the iClicker polls, and register your remote or mobile/web app using your Princeton NetID email address:

Using a classmate’s iClicker (or allowing someone else to use your iClicker) during lecture is prohibited.

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