2 ms·
That's not silly, that's the right way to solve that problem, unless y - x is large enough that you'd benefit from using one bit per number instead of one word.
by kragen 5y ago
That's not silly, that's the right way to solve that problem, unless y - x is large enough that you'd benefit from using one bit per number instead of one word. Well, usually calling qsort() would be fast enough, and less code.