Template Function ADS::bogoSort

Function Documentation

template<class T, class R, class C = std::less<>>
long ADS::bogoSort(std::vector<T> &A, R &g, C less = C())

the bogo sort with the generator g; the number of shuffles

Pre:

n <= 10

Post:

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