Mo's Algorithm · Offline Range Queries
unseel.com · √n blocks · two-pointer sweep
n=16, q=6 Block √n = 4
Cost O((n+q)√n)
Stage array + queries
Array cell
Query [L, R]
Two-pointer position
Answer computed
Unseel.com · Mo's Algorithm