Knapsack and Subset Problems
Question 1 of 6
In the 1D space-optimized 0/1 knapsack, why must you iterate capacity right-to-left (from W down to weight[i])?
Question 1 of 6
In the 1D space-optimized 0/1 knapsack, why must you iterate capacity right-to-left (from W down to weight[i])?