--- from: http://rosettacode.org/wiki/Knapsack_problem/Bounded note: Classic CS problems and programs