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
Harmonic divisor number Harmonic divisor number In mathematics, a harmonic divisor number, or Ore number (named after Øystein Ore who defined it in 1948), is a positive integer whose divisors have a harmonic mean that is an integer. The first few harmonic divisor numbers are For example, the harmonic divisor number 6 has the four divisors 1, 2, 3, and 6. Their harmonic mean is an integer: The number 140 has divisors 1, 2, 4, 5, 7, 10, 14, 20, 28, 35, 70, and 140. Their harmonic mean is: 5 is an integer, making 140 a harmonic divisor number. The harmonic mean of