We have an array of floats
how can we get the numbers that if added together give the closest sum to an X number let’s say 12?
ideally each number should only be used once…
then get the next best sum from the remaining numbers etc…
This is apparently called a knapsack problem
I thought to post it here - if I figure it out -as an example.
has anybody dealt with a similar problem before?