Point Decomposition for Path Counting in Trees
Point decomposition, also known as centroid decomposition, is a powerful technique for efficiently solving path-related problems on trees. By recursively splitting the tree around its centroid, it ensures logarithmic depth of recursion, leading to optimal time complexity for many tree queries.
The algorithm follows three core steps:
Find the c ...
Posted on Tue, 07 Jul 2026 16:30:43 +0000 by glassroof