← All chapters
Chapter 07Weeks 11–12Phase 3 ~2.8 h
Graphs
Vocabulary, adjacency matrix and list, directed graphs, BFS and DFS.
- 7.1Graph TerminologyVertices and edges, adjacency, degree, paths, cycles, connected graphs, weighted graphs, and how a tree is a special graph. 35 mineasy
- 7.2Adjacency Matrix & Adjacency ListTwo ways to store a graph in memory, what each costs, and when to choose which. 45 minmedium
- 7.3Directed GraphsOne-way edges, in-degree and out-degree, directed paths and cycles, and how the matrix and list change. 30 mineasy
- 7.4BFS & DFSBreadth-first search with a queue, depth-first search with recursion or a stack, the visited array, and O(V + E). 60 minmedium