Graph Thinking Patterns: Components, Distances, and Paths

In the previous article, we learned how Depth First Search (DFS) works on trees.