With block size : -pointer: moves per query = -pointer: for each -block, sweeps the full -range once, so per -block. With -blocks, total = -pointer: moves per -block pair, pairs =
Total: . For , the complexity is .
Why n^(5/3)?
With block size : -pointer: moves per query = -pointer: for each -block, sweeps the full -range once, so per -block. With -blocks, total = -pointer: moves per -block pair, pairs =
Total: . For , the complexity is .