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
Integer triangle double triangular number ( + 1) and for "c" odd it is the square . It also means that the number of integer triangles with greatest side "c" exceeds the number of integer triangles with greatest side "c"−2 by "c". The sequence of the number of non-congruent integer triangles with largest side "c", starting at "c" = 1, is: The number of integer triangles (up to congruence) with given largest side "c" and integer triple ("a", "b", "c") that lie on or within a semicircle of diameter "c" is the number of integer triples such that "a" + "b" >