Counting sort sorts keys in by counting the keys of each value, computing from the counts where each value’s block starts, and copying each key to the next free cell of its block, in input order. Radix sort, least significant digit first, sorts keys of digits by passes of a stable sort on one digit, from the last digit to the first.