Least You Need to Know: BFS, DFS, and Connected Components
打开课程
**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.