Template Function ADS::longestSegmentAtLeast

Function Documentation

template<class T>
Segment<T> ADS::longestSegmentAtLeast(const std::vector<T> &D, T t)

the longest segment of sum at least t, length 0 if none, O( n )

Post:

its sum is that of its items and at least t (an audit)