Tootesort
Tootesort is a simple, non-comparison-based sorting algorithm designed for sorting small arrays of integers with a limited range of values. The algorithm works by counting the occurrences of each unique value in the input array and then reconstructing the sorted array from these counts. It is particularly efficient when the range of possible values (often denoted as *k*) is not significantly larger than the number of elements to be sorted (*n*).
The process begins by initializing an auxiliary array, often called a "count array," with a size equal
Tootesort operates in linear time, O(n + k), where *n* is the number of elements and *k* is
While Tootesort is not commonly used in practice due to its limited applicability, it serves as an