Template Function ADS::maxSumSegmentCubic

Function Documentation

template<class T>
Segment<T> ADS::maxSumSegmentCubic(const std::vector<T> &D)

a nonempty segment of largest sum, by all the pairs, O( n^3 )

Pre:

D not empty