I've now received the 1st 100% correct solution to the lsd radix sort!!! To encourage you all to go ahead with the msd version too I'll give you an extra 25% bonus for getting them both. That is, the max score will be 125 rather than 100. You can send them one at a time or both together as you please. In order to catch some of the errors which manage to end up with the same values spread over the entire array it is helpful to change your main() and check_order() functions as follows ... main(int argc, char *argv[]) { int i, nvals = 10000; unsigned int *array; if(argc > 1) nvals = atoi(argv[1]); array = malloc(nvals * sizeof(unsigned int)); for(i = 0; i < nvals; i++) array[i] = rand(); check_order(array, nvals); lsd_radix_sort(array, nvals); check_order(array, nvals); } int check_order(unsigned int *ip, int n) { int i, sum = 0, nrev = 0; sum = ip[0]; for(i = 1; i < n; i++) { if(ip[i-1] > ip[i]) nrev++; sum += ip[i]; } printf("checksum %d\n", sum); if(nrev) printf("%d misorderings\n", nrev); else printf("array is in order\n"); return(nrev); } ... This will run the check_order() both before and after you have done the sorting procedure. Before sorting the array should be about 50% out of order and of course completely in order afterwards. Also, no matter what the order is, you should get the same checksum before and after as long as you have not duplicated any numbers etc. Therefore, this is a more robust error check. Your result should be similar to this... [awetzel@europa /tmp]$ time a.out 100000000 checksum 563608529 50000280 misorderings checksum 563608529 array is in order real 0m40.853s user 0m35.110s sys 0m5.740s