public static void countSort(int intArr[], int len, int d){
		int i, holder;
		int[] oArr = new int[len];//The output array
		
		int[] bucket = new int[len];
		Arrays.fill(bucket, 0);

		//Store count of occurences in bucket
		for (i=0; i<len; i++){
			holder = (intArr[i]/d) % 10;
			bucket[holder]++;
		}

		for (i=1; i<10; i++)
			bucket[i] += bucket[i-1];

		//Builds the sorted array
		for (i=len-1; i>=0; i--){
			holder = (intArr[i]/d) % 10;
			oArr[bucket[holder]-1] = intArr[i];
			bucket[holder]--;
		}

		//Copies the built array to the main array
		for (i=0; i<len; i++)
			intArr[i] = oArr[i];
	}