How would you go about generating all possible permutations of a list of integers, but the sum of the list can never be over the target?
Example:
List of given integers: 1000, 1400, 1054, 2201, 657, 3104, ..
Target: 4000
Output: [1000, 1400, 1054], [2201, 657]
Another possible output would be the following:
Output: [1000], [1400], [1054], ..
Numbers can only be used once, and every number has to be used.
It sounds very similar to the One dimensional Cutting Stock Problem (1D CSP), I want to find a more 'brute force' like answer, instead of a linear programming solution, in order to explore the time disadvantages in big data sets.