Groups
Category
The Harmonic Lemma says that the values of \lfloor n/i \rfloor only change about 2\sqrt{n} times, so you can iterate those value blocks in O(\sqrt{n}) instead of O(n).
Mo's algorithm answers many range queries offline by reordering them to minimize pointer movement along the array.