Graph Theory37 sections · 1633 units
Open in Course

Section Recap

Trees are mastered

You have gone deep into trees. - Structure: Root, Parent, Child, Leaf. - Traversal: DFS with parent check (no visited array). - Tree DP: Calculating sizes/heights bottom-up. - Diameter: The longest path (Double BFS). - Centers: Peeling the tree layer by layer.

Trees are effective, but they are static. In the next section, you look at how to manage groups that change over time using Disjoint Set Union (DSU).