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
Algebraic integer a finite extension . Algebraic integer In algebraic number theory, an algebraic integer is a complex number that is a root of some monic polynomial (a polynomial whose leading coefficient is 1) with coefficients in (the set of integers). The set of all algebraic integers, , is closed under addition and multiplication and therefore is a commutative subring of the complex numbers. The ring is the integral closure of regular integers in complex numbers. The ring of integers of a number field , denoted by , is the intersection of and : it can also be characterised as the maximal