Loading repovive.com/roadmaps/graph-theory
Roadmaps
Graph Theory
Centroid Decomposition
Problemset
Discussion
AI Helper
Graph Fundamentals
0/41
Depth First Search (DFS)
0/41
Breadth First Search (BFS)
0/40
Flood Fill & Grid Graphs
0/32
Bipartite Graphs
0/48
Tree Fundamentals
0/44
Tree Diameter & Center
0/45
Subtree DP
0/44
Floyd-Warshall Algorithm
0/41
Dijkstra's Algorithm
0/40
Bellman-Ford Algorithm
0/48
Mixed Practice - Shortest Paths
0/36
Disjoint Set Union (DSU)
0/49
Minimum Spanning Trees
0/48
Topological Sort
0/41
DP on DAGs
0/50
Mixed Practice: Graph Traversals
0/35
Strongly Connected Components
0/45
2-SAT
0/51
Mixed Practice: Connectivity & MST
0/35
Rerooting Technique
0/39
Euler Tour Technique
0/51
Mixed Practice: Tree Fundamentals
0/29
Binary Lifting
0/50
Lowest Common Ancestor (LCA)
0/51
Games on Graphs
0/62
Heavy-Light Decomposition
0/49
Centroid Decomposition
0/55
1
Intro
2
Why Centroid Decomposition?
3
What is a Centroid?
4
Centroid Existence Proof
5
Finding the Centroid
6
Example: Finding a Centroid
7
Centroid Properties
8
Quiz: Centroid Properties
9
The Centroid Decomposition Tree
10
Why Depth is O(log n)
11
Quiz: Decomposition Tree Depth
12
Building the Decomposition Tree
13
Decomposition Tree vs Original Tree
14
Paths Through Centroids
15
Divide and Conquer on Trees
16
Problem - Finding a Centroid
17
Read Statement
18
Core idea 1 - Subtree Sizes
19
Core idea 2 - Walk to Heavy Subtree
20
Algorithm - Find Centroid
21
Finding a Centroid - Implementation
22
Walkthrough
23
Lessons Learned
24
Quiz: Finding the Centroid
25
Problem - Fixed-Length Paths I
26
Read Statement
27
Core idea 1 - Paths Through Centroid
28
Core idea 2 - Combining Subtree Paths
29
Core idea 3 - Subtract Same-Subtree Paths
30
Algorithm - Count Paths Through Centroid
31
Fixed-Length Paths I - Implementation
32
Walkthrough
33
Lessons Learned
34
Quiz: Counting Paths Through Centroid
35
Problem - Fixed-Length Paths II
36
Read Statement
37
Core idea - Count Range Instead of Exact
38
Algorithm - Count Paths in Range
39
Fixed-Length Paths II - Implementation
40
Walkthrough
41
Lessons Learned
42
Distance Queries with Centroid Decomposition
43
When to Use Centroid Decomposition
44
Quiz: When to Apply Centroid Decomposition
45
Centroid Decomposition vs Other Techniques
46
Implementation Tips
47
Complexity Analysis
48
Space Complexity
49
Variations and Extensions
50
Debugging Centroid Decomposition
51
Practice Problems
52
Check Your Understanding
53
Check Your Understanding
54
Check Your Understanding
55
Section Recap
Small-to-Large Merging
0/40
Functional Graphs
0/47
Mixed Practice: Advanced Tree Techniques
0/36
Bridges and Articulation Points
0/58
Network Flow
0/54
Maximum Bipartite Matching
0/50
Minimum Cut
0/47
Euler Paths and Circuits
0/37
Mixed Practice: Advanced Graphs
0/24
28.1
Intro
3 minutes
100%
Tasks
Read Unit