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 StructureIntermediate
Rollback DSU
Rollback DSU (Disjoint Set Union with undo) lets you union sets and later revert to any previous state in LIFO order.
#rollback dsu#dsu with undo#union find+11