Template Function ADS::nonAdjacentSelection

Function Documentation

template<class T>
std::pair<T, std::vector<std::size_t>> ADS::nonAdjacentSelection(const std::vector<T> &A)

the same, and the places of the items, increasing; an item is taken only if it makes the sum larger

Post:

no two places adjacent, the items of the sum found