Template Function ADS::countingSort

Function Documentation

template<class T>
void ADS::countingSort(std::vector<T> &A, std::size_t k)

countingSort(): A, of integers in [ 0 , k ), in increasing order

Pre:

each key of A is in [ 0 , k )

Post:

A is sorted, with the same keys