Least You Need to Know: BFS, DFS, and Connected Components
Open lesson
Breadth-first search explores layer by layer, while depth-first search follows one path deeply before backtracking. Both are core graph tools, and both can be used to discover reachability and connected components.