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 norm of a quadratic integer is always an integer. If , the norm of a quadratic integer is the square of its absolute value as a complex number (this is false if ). The norm is a completely multiplicative function, which means that the norm of a product of quadratic integers is always the product of their norms. Every quadratic integer has a conjugate An algebraic integer has the same norm as its conjugate, and this norm is the product of the algebraic integer and its conjugate. The conjugate of a sum or a product of algebraic integers is the