void radixSort (int A[], int n, int d) {// for (int j= 0; j < d; j++){ // sort each item according to digit int G0[n]; int count0= 0; int G1[n]; int count1= 0; //... // and so on for (int i= 0; i < n; i++) {// this is for each item int k= digit(A[i], j); // gets the jÕth digit of A[i] switch (k) { case 0 : {G0[count0]= A[i]; count0++; break;} case 1 : {G1[count1]= A[i]; count1++; } } } int y=0; // copy back into A for(int x= 0; x< count0; x++) { A[y]= G0[x]; y++; } for(int x= 0; x< count1; x++) { A[y]= G1[x]; y++; }// ...// and so on }}