Why do we sort the left pointer by sqrt(N) in Mo's Algorithm?

Revision en1, by TooGoodToLoose, 2018-09-14 01:04:11

In Mo's Algorithm, we sort the left pointer by using sqrt(N).

However if we consider two left pointers a and b such that a<b then a/c<b/c where c=sqrt(N). Thus it won't matter if we sort it by a<b or a<c<b/c.

I know I am missing something, but I can't figure it out.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English TooGoodToLoose 2018-09-14 01:14:07 0 (published)
en2 English TooGoodToLoose 2018-09-14 01:13:47 10 (saved to drafts)
en1 English TooGoodToLoose 2018-09-14 01:04:11 345 Initial revision (published)