Concepts4
๐๏ธData StructureAdvanced
Sqrt Tree
A sqrt tree is a layered block-decomposition data structure that answers range queries in O(1) time after O(n \log \log n) preprocessing.
#sqrt tree#range query#associative operation+11
๐๏ธData StructureAdvanced
Segment Tree with Range Affine Transformation
A segment tree with lazy propagation can support range updates of the form x โ aยทx + b (affine transformations) and range-sum queries in O(log n) per operation.
#segment tree#lazy propagation#affine update+12
๐๏ธData StructureAdvanced
Segment Tree Beats
Segment Tree Beats is a segment tree variant that supports range chmin/chmax (clamping) together with queries like range sum, min, and max in amortized logarithmic time.
#segment tree beats#range chmin#range chmax+12
๐๏ธData StructureAdvanced
Segment Tree - Handling Multiple Lazy Operations
When a segment tree supports multiple range updates, you must define how lazy tags compose, because the order of operations matters and composition is not commutative.
#segment tree#lazy propagation#range add+12