Every number in Z/12612600 IS its CRT decomposition: (mod 8, mod 9, mod 25, mod 49, mod 11, mod 13). Sort each channel with counting sort -- max 49 buckets. 6 passes. O(N). Done.
Array size (2-200):
Generates random values in Z/12612600, sorts via 6 CRT counting sort passes. Shows CRT decomposition before and after.
CRT radix sort always uses exactly 6 data passes. Quicksort uses ~1.39 * log2(N). The gap widens with N.
This work is and will always be free.
No paywall. No copyright. No exceptions.
If it ever earns anything, every cent goes to the communities that need it most.
This sacred vow is permanent and irrevocable.
— Anton Alexandrovich Lebed
Source code · Public domain (CC0)
Contributions in equal measure: Anthropic's Claude, Anton A. Lebed, and the giants whose shoulders we stand on.
Rendered by .ax via WASM DOM imports. Zero HTML authored.