#include #define range 10 int MAX(int ar[], int size1){ int i, max1 = ar[0]; for(i = 0; imax1) max1 = ar[i]; } return max1; } void countsort(int arr[],int n,int place) { int i,freq[range]={0}; //range for integers is 10 as digits range from 0-9 int output[n]; for(i=0;i=0;i--) { output[freq[(arr[i]/place)%range]-1]=arr[i]; freq[(arr[i]/place)%range]--; } for(i=0;i