** Radix sort ** Using random numbers in the range 0 .. 1000000. Here's the inital list : 0 434864 1 100387 2 441357 3 457144 4 753902 9994 154474 9995 774481 9996 52409 9997 832532 9998 711681 9999 542663 Starting sort. Starting sort on digit 0 .. .. done digit 0 0 901140 1 772480 2 371280 3 452210 4 992370 9994 329089 9995 84089 9996 369549 9997 990619 9998 135379 9999 52409 Starting sort on digit 1 .. .. done digit 1 0 352700 1 309500 2 465100 3 584700 4 86800 9994 493899 9995 899099 9996 510499 9997 729199 9998 830299 9999 611299 Starting sort on digit 2 .. .. done digit 2 0 147000 1 583000 2 45000 3 74000 4 404000 9994 151998 9995 173998 9996 402998 9997 439998 9998 837999 9999 735999 Starting sort on digit 3 .. .. done digit 3 0 380001 1 260001 2 240001 3 210001 4 260002 9994 919990 9995 409991 9996 169991 9997 19993 9998 459994 9999 439998 Starting sort on digit 4 .. .. done digit 4 0 5 1 48 2 800060 3 800072 4 800076 9994 499942 9995 99956 9996 699970 9997 199976 9998 99977 9999 699990 Starting sort on digit 5 .. .. done digit 5 0 5 1 48 2 441 3 451 4 620 9994 999340 9995 999530 9996 999631 9997 999664 9998 999723 9999 999908 Starting sort on digit 6 .. .. done digit 6 0 5 1 48 2 441 3 451 4 620 9994 999340 9995 999530 9996 999631 9997 999664 9998 999723 9999 999908 Done. Elapsed time with n=10000 is 0.184522151947021 . Here's the sorted list : 0 5 1 48 2 441 3 451 4 620 9994 999340 9995 999530 9996 999631 9997 999664 9998 999723 9999 999908