counting algorithm with the linear time complexity of O(n).
we have a class of sorting algorithms that are based of comparision. In these algorithm the time complexity never becomes less than O(nlogn). so we should search on algorithms that take some restrictions. so a limit could be that the numbers are all integers and they are in a limited closed bounderies which means between 0 to 10 or between 10 to 99.
the foundation of algorithm is that first it counts each number in the list. After that it create an index array with length of maximum number in the list. Then each index of the the index array is correspond to the number in the list. We fill each index with the counts of each number in the list. So It is the foundation, It isn't aimed for further details.