Function ADS::subsetSumExists

Function Documentation

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

a set of the places of A of sum k, by backtrack, or nothing

Pre:

A is not negative

Post:

the places returned are distinct, of sum k