Template Function ADS::nthElement(std::vector<T>&, std::size_t, C)

Function Documentation

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

the item of rank k (from 0) of A, which is rearranged

Pre:

k < A.size()