Counting sort is a sorting algorithm that operates by counting the number of objects that have each distinct key value, and using arithmetic on those counts to determine the positions of each key value in the output sequence. Counting sort is an integer sort, i.e. it can only sort integers but it takes advantage of integer arithmetic to sort. https://en.wikipedia.org/wiki/Counting_sort
Part of my series of sorting algorithms: https://scratch.mit.edu/studios/14132246/