I was reading dynamic programming problem, 0/1 knapsack at https://www.educative.io/courses/grokking-dynamic-programming-patterns-for-coding-interviews/RM1BDv71V60
Upon r