Sorry couldn't think of a better title. So here is an example of my problem. I have a list of items that have values such as 120, 100, 70, 65, 30 20. Now I want combination of 3 of these that will be close to 165.
I was looking into solutions using the napsack idea however I don't know how to make some of the solutions for that work when we have two limiting factors being number of items allowed and the max value.
Any direction or help would be great.
We could use the example I gave... List we have 120,100,70,65,30,20 I'm looking for a combination of 3 numbers that is under 165. I'm hoping that the system I use will be scalable to change both the 165, and number allowed in the combination.