What is the time complexity of the brute force algorithm used to solve the Knapsack problem?

What is the time complexity of the brute force algorithm used to solve the Knapsack problem? Correct Answer O(2n)

In the brute force algorithm all the subsets of the items are found and the value of each subset is calculated. The subset of items with the maximum value and a weight less than equal to the maximum allowed weight gives the answer. The time taken to calculate all the subsets is O(2n).

Related Questions

Which of the following statement about 0/1 knapsack and fractional knapsack problem is correct?