Function ADS::subsetSumSet

Function Documentation

inline std::optional<Nodes> ADS::subsetSumSet(const std::vector<long> &A, long k)

the places of a subset of A of sum k, by the table of all the rows, O( n k ) time and space, or nothing

Pre:

A is not negative

Post:

the places returned are distinct, of sum k