I think the hint given for this question is wrong

I was able to solve this problem using 1D Dp as there was infinite supply for packet of oranges whereas Sanket Sir in hint suggests that it will be solved using 2D dp.

Hey @ap8730390
We can do this question with 1D Dp or 2D

I was not able to understand 2d dp . In that what is the meaning of the cell of 2d dp of(n+1)*(w+1)?
What does each cell imply in the dp matrix?

@ap8730390
watch hints Video