Important lessons:
Centroid decomposition reduces tree queries to queries about centroid ancestors
The depth bound keeps space and time manageable
Any path in the tree passes through exactly one lowest common centroid ancestor
LCA-based distance is simpler for this problem, but centroid decomposition extends to harder variants When should you use centroid decomposition over LCA? When the problem involves updating nodes or more complex path properties.