Concepts3
🗂️Data StructureAdvanced
Top Tree
Top trees are dynamic tree data structures that represent a forest as a hierarchy of clusters, allowing O(log n) amortized time for link, cut, path queries/updates, and many subtree queries.
#top tree#dynamic tree#link cut+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
🗂️Data StructureAdvanced
HLD - Path Queries and Updates
Heavy-Light Decomposition (HLD) breaks a tree into a small number of vertical chains so any path (u,v) becomes O(log n) contiguous segments in an array.
#heavy light decomposition#hld#path query+12