In-place Counting Sort



How to modify counting sort so that it sorts the elements in place,
i.e. using extra amount of memory that is constant and independent of
the size of the input.

.