Template Function ADS::cycleSort

Function Documentation

template<class T, class C = std::less<>>
std::size_t ADS::cycleSort(std::vector<T> &A, C less = C())

the cycle sort; the number of writes in A

Post:

A is sorted, with the same items (an audit), and the writes are at most n