Concepts3
🗂️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
🗂️Data StructureAdvanced
Centroid Decomposition
Centroid decomposition splits a tree around a special node (centroid) so that every remaining component has at most half the nodes.
#centroid decomposition#centroid tree#tree algorithms+11
🗂️Data StructureAdvanced
Dynamic Segment Tree
A dynamic segment tree stores values over a huge coordinate range by creating nodes only when an operation touches their interval.
#dynamic segment tree#sparse segment tree#lazy propagation+12