Assume algorithm is input elements ranging from 1 to k.

Find the number of elements and put A[i] in B[j].

If k = O(n), then T(n) for counting sort = .