The subset sum problem is an important problem in computer science. Below we'll provide a simple algorithm for solving this problem. The challenge is to determine if there is some subset of numbers in an array that can sum up to some number S. These algorithms can both be implemented to solve Array Addition I and Array Addition.
Simple (Naive) solution
You need to be a premium member to see the rest of this question and code.