Counting sort initialization of the output array, each take time. Therefore, the time for the whole algorithm is the sum of the times for these steps, . Because it uses arrays of length and , the total space usage of the algorithm is also . For problem instances in which the maximum key value is significantly smaller than the number of items, counting sort can be highly space-efficient, as the only storage it uses other than its input and output arrays is the Count array which uses space . If each item to be sorted is itself an integer, and used as
Transposable integer permutations of 006993 can be obtained from this repeating decimal if we select six consecutive digits from the repeating decimal starting from different digits. This illustrates that cyclic permutations are somehow related to repeating decimals and the corresponding fractions. The greatest common divisor (gcd) between any cyclic permutation of an "m"-digit integer and 10 − 1 is constant. Expressed as a formula, where "N" is an "m"-digit integer; and "N" is any cyclic permutation of "N". For example, If "N" is an "m"-digit integer, the number "N", obtained by shifting "N" to the left cyclically, can be obtained from: where