Given a list of numbers, lst = [1, 1, 2, 4, 3, 2, 1, 1, 1, 2, 1, 4, 3, 1]
how would I find an ideal number of lists which are less than or equal to 4?
There are many possibilities here. The goal is to minimize the number of possible lists. The program would need to do create subset lists like the following: {4}, {4}, {3, 1}, ... , {1, 1}
.
Notice how the last list subset does not equal to four, but it less. This problem is difficult for the following reasons:
- The program must be able to find
subset-sums
which are less than or equal to a sum - The program will needs to begin by removing values out of the original list into subset lists by first looking at the largest values