NVIDIA interview question

2 D Knapsack DP Problem