Save this video — free

Searching and Sorting Graphs

Kent Quanrud · 1:10:30 · Watch on YouTube

Searching and Sorting Graphs Watch on YouTube →

Overview

Kent Quanrud develops graph-search techniques from topological sorting through depth-first search (DFS) to strongly connected components (SCCs). He shows how DFS finishing order yields a second linear-time topological sort for directed acyclic graphs, then derives the two-pass Kosaraju algorithm, which finds every SCC in O(n + m) time by searching the reversed graph first and the original graph next.

Key takeaways

Chapters

0:00 Graph Basics: Vertices, Edges, and Representations
1:36 DAGs, Circuit Evaluation, and Topological Order
6:50 Topological Sorting by Repeatedly Removing Sources
10:00 The Cat Maze as a Graph-Reachability Problem
16:57 Why Naive Recursive Reachability Can Loop Forever
23:40 DFS Marks Vertices to Search Without Repeating Work
29:40 Proving DFS Reaches Every Vertex It Can Reach
35:24 DFS Finishing Times Order Reachable Vertices
40:26 Topological Sorting by Reversing DFS Postorder
44:49 Strong Connectivity and Component Equivalence Classes
48:52 Finding One SCC with a Reversed-Edge Graph
56:04 Why Repeated SCC Searches Need a Better Processing Order
1:03:32 DFS Finishing Order Identifies Sink Components
1:08:30 Kosaraju’s Two-Pass Algorithm Finds All SCCs

Keep these chapters and the full searchable transcript in your own library.

Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Kent Quanrud.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.