//CIS 610: Sorting //Syed Rais Ahmad //Due Nov 11,99 //Sorting by counting. #include #define SIZE 10 main() { void counting(int *); int arr[]={11,3,11,11,1,2,6,3,9,4}; counting(arr); return 0; } void counting(int * x) { int count[SIZE][2]; int i=0,j=0,k=0; for (i=0;i-1;i--) if (count[i][1]>1) { for(j=count[i][1];j>0;j--) count[i-j+1][0]=count[i][0];} for(i=0;i