Template Function ADS::oddEvenSort

Function Documentation

template<class T, class C = std::less<>>
void ADS::oddEvenSort(std::vector<T> &A, C less = C(), std::size_t *rounds = nullptr)

the odd-even transposition sort; the rounds go to *rounds, if given

Post:

A is sorted, with the same items (an audit)