Why it matters
Centroid decomp enables O(n log n) tree algorithms.
Advertisement
The architecture
Centroid: node whose removal leaves subtrees ≤ n/2.
Recursively decompose each subtree.
Advertisement
How it works end to end
Applications: path counting, distance queries.
Implementation: recursively find + process.
Combines with other techniques (BFS from centroid).