Mark As Completed Discussion

Build your intuition. Fill in the missing part by typing it in.

To apply the knapsack solution to the subset sum problem, we can treat the numbers as the items and the target sum as the weight capacity of the knapsack. We can create a boolean 2D array dp, where dp[i][j] represents whether we can achieve a sum of j using the first i numbers.

The subset sum problem can be solved using a _ ____array.

Write the missing line below.