Concepts2
⚙️AlgorithmAdvanced
Virtual Tree (Auxiliary Tree)
A Virtual Tree (Auxiliary Tree) compresses a large tree into a much smaller tree that contains only the k important nodes and the LCAs needed to keep them connected.
#virtual tree#auxiliary tree#lca+12
🗂️Data StructureAdvanced
Centroid Decomposition - Distance Queries
Centroid decomposition splits a tree into levels by repeatedly removing a centroid so that each remaining component is at most half the size.
#centroid decomposition#tree distance queries#nearest red node+12