Oct-18-2021, 07:35 PM
I need to find the best way to make an exact 1000g pot by choosing 120g to 350g pieces from an array. If I don't find 1000, I can go up to 1015.
[0] 330
[1] 250
[2] 333
[3] 334
[4] 280
[5] 333
[6] 334
If I choose 2,3 and 5 I can get that exact value.
I've currently made some changes to KnapSack, but I couldn't adapt to just one dimension.
[0] 330
[1] 250
[2] 333
[3] 334
[4] 280
[5] 333
[6] 334
If I choose 2,3 and 5 I can get that exact value.
I've currently made some changes to KnapSack, but I couldn't adapt to just one dimension.