Groups
Category
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 answers many range queries offline by reordering them to minimize pointer movement along the array.