Which of the following lines completes the above code?
find_max(ans[itm - 1][w - wt[itm - 1]] + val[itm - 1], ans[itm - 1][w])
find_max(ans[itm - 1][w - wt[itm - 1]], ans[itm - 1][w])
ans[itm][w] = ans[itm - 1][w];
ans[itm+1][w] = ans[itm - 1][w];
Answer and explanation
find_max(ans[itm - 1][w - wt[itm - 1]] + val[itm - 1], ans[itm - 1][w]) completes the above code.
