Concepts2
⚙️AlgorithmAdvanced
CDQ Divide and Conquer
CDQ divide and conquer is an offline technique that splits the timeline (or one coordinate) and lets updates from the left half contribute to queries in the right half.
#cdq divide and conquer#offline algorithm#fenwick tree+11
🗂️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