Template Function ADS::longestDistinctSegment

Function Documentation

template<class T, class Hash = std::hash<T>>
std::pair<std::size_t, std::size_t> ADS::longestDistinctSegment(const std::vector<T> &A)

the start and the length of the first longest segment of A with no value repeated

Post:

the values of the segment distinct