For example we have the array like this: [, , , , , ] First step is using Counting sort for last digit, in our example is: [, , , 233] [, , , , , ] Then sort according to the last digit: [, , , , , ] Then using second last digit to the sort: [, , , ,…