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
Quadratic integer examples of most studies of algebraic number fields. The quadratic integer rings divide in two classes depending on the sign of . If , all elements of formula_22 are real, and the ring is a "real quadratic integer ring". If , the only real elements of formula_22 are the ordinary integers, and the ring is a "complex quadratic integer ring". For real quadratic integer rings, the ideal class number, which measures the failure of unique factorization, is given in OEIS A003649; for the imaginary case, they are given in OEIS A000924. For < 0, ω is a complex (imaginary or