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
Square-free integer (that is a integer such that is divisible by the square of every prime factor) and a square-free integer, which are coprime. The square-free factor, called the "square-free part" of the number, is the largest square-free divisor of that is coprime with . The square-free part of an integer may be smaller than the largest square-free divisor. Any arbitrary positive integer can be represented in a unique way as the product of a square and a square-free integer : In this factorization, is the largest divisor of " such that is a divisor of . In summary, there are three