Concepts3
⚙️AlgorithmIntermediate
Offline Query Processing
Offline query processing means you collect all queries first and answer them later in a smart order that makes updates/queries cheap.
#offline query processing#mo's algorithm#fenwick tree+12
⚙️AlgorithmAdvanced
Mo's Algorithm - With Updates
Mo's algorithm with updates treats array modifications as a third dimension called time and answers range queries on the correct version of the array.
#mo's algorithm with updates#time dimension#offline range queries+11
⚙️AlgorithmIntermediate
Mo's Algorithm
Mo's algorithm answers many range queries offline by reordering them to minimize pointer movement along the array.
#mo's algorithm#offline queries#range queries+12