Algorithm to find which number in a list sum up to a certain number
This problem reduces to the 0-1 Knapsack Problem, where you are trying to find a set with an exact sum. The solution depends on the constraints, in the general case this problem is NP-Complete. However, if the maximum search sum (let’s call it S) is not too high, then you can solve the problem using … Read more