pre-requisite: n element values are between 0 to k.

sort:

auxiliary array to hold how many elements less than current value i, i belongs to [0, k]


counting-sort

相关文章: