In complete backpack problem, the 1D-array dp solution is a optimization of 2D-array dp solution.In the discuss , most solution is 1D-array dp solution, how to write the 2D-array dp solution just like the complete backpack problem?
I think there is. But is not simple as 1D-array. Because we need to scan the 2D-array, column by column and each time scan the first row element of j column, we need to use the last row element of column j - 1. It makes it not easy.
Even if this problem seems like 0/1 backpack problem, but we'd better think is as what the top solution shows