An integer sorting algorithm that works by counting the number of objects having distinct key values and doing arithmetic to calculate positions.
Counting sort is an integer 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. It is a non-comparison sorting algorithm with linear time complexity, making it very efficient for sorting integers within a known range.