Concepts2
⚙️AlgorithmIntermediate
LCA - Binary Lifting
Binary lifting precomputes 2^k ancestors for every node so we can jump upward in powers of two.
#lca#binary lifting#tree+12
🗂️Data StructureAdvanced
Link-Cut Tree
A Link-Cut Tree (LCT) maintains a dynamic forest and supports link, cut, and path queries in O(log n) amortized time.
#link-cut tree#dynamic tree#splay tree+12