Number of Cateogires are 5, Thier total weights are
M=6=Maximum Capacity= W
I am having confusion How to solve using dynamic approach 0/1 Dynamic Knapsack problem
Do we firstly need to arrande the weights in increasing order ??????????
table[x][y] = Optimum result when taking items only from $1$ to $x$ for a knapsack of current capacity $y$
In $0/1$ version dynamic state transitions are:
[i][w] = max(value[i] + K[i-1][w-Wt[i]], table[i-1][w]);
table[i][w] = table
I am solving Please tell whether i solved Correct or Wrong ?
What i am thinking that weight should be arranged in increasing order .
will it be wrong if i arrange in increasing/Ascending order ?
rawkstar watch this