Template Function ADS::largestDivisibleSubset

Function Documentation

template<std::integral T>
std::vector<T> ADS::largestDivisibleSubset(std::vector<T> A)

a largest subset of A in which of any two items one divides the other, sorted

Pre:

A positive and distinct

Post:

each item divides the next