132k views
21 votes
Which of the following methods can be used to solve the knapsack problem?

a. Brute Force algorithm
b. Recursion
c. Dynamic programming
d. All of the mentioned

1 Answer

3 votes

Answer: D. All of those mentioned

Step-by-step explanation:

The knapsack problem is a problem that typically occurs in combinatorial optimization and is also a 2D dynamic programming example.

We should note that all the methods given in the option such as recursion, brute force algorithm and dynamic programming can all be used to solve knapsack problem.

Therefore, the correct answer is D.

User Jamillah
by
6.8k points