Template Function ADS::maxNonAdjacentSum

Function Documentation

template<class T>
T ADS::maxNonAdjacentSum(const std::vector<T> &A)

the largest sum of items of A no two of them adjacent, 0 for none

Post:

not negative