Concepts2
⚙️AlgorithmIntermediate
Double Counting
Double counting is the strategy of counting the same quantity in two different ways to derive an equality or an efficient algorithm.
#double counting#contribution technique#handshake lemma+12
⚙️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