Based on this video, the tutor explains the knapsack problem with dynamic programming approach. One thing is not cleared in this video, which is my main question.
All the values on the first row (except 0) are set to 1 because value and weight (on that row) are 1 hence, we cannot exceed that number
-What would be the values of the first row if weight and value were not both the same?
So let's say value is 25 and weight 3 (first row values):
I suppose the first row results would be
Let me know if i am wrong. Thank you.
Note that the first row is important to be correct as every row depends on the previous one. The tutor's example in the video, is not the best as the first row value and weight are both 1.