MCQOPTIONS
Saved Bookmarks
| 1. |
Consider the following dynamic programming implementation of the Knapsack problem.Which of the following lines completes the below code? |
| A. | Find_max(ans[itm 1][w wt[itm 1]] + val[itm 1], ans[itm 1][w]) |
| B. | Find_max(ans[itm 1][w wt[itm 1]], ans[itm 1][w]) |
| C. | Ans[itm][w] = ans[itm 1][w], |
| D. | None of the mentioned |
| Answer» B. Find_max(ans[itm 1][w wt[itm 1]], ans[itm 1][w]) | |