edited by
1,047 views
0 votes
0 votes

Read the following statements about 0/1 Knapsack problem.

(i) Time complexity of Knapsack is O(n* W) where W is the weight of the Knapsack and there are n items.
(ii) Time complexity of Knapsack is min( O(n*W) , O(2^n) ) where W is the weight of the Knapsack and there are n items.
(iii) Knapsack can be implemented in O(n*W) space .
(iv) Knapsack can be implemented in O(W) space.

where n is the number of items and W is the weight of the Knapsack .

Mark the correct option

  1.   (i) and (iii) is true
  2.   (ii) and (iii) is true
  3.   (i) ( iii) (iv) is true
  4.  (ii) (iii) (iv) is true.
edited by

Please log in or register to answer this question.

Related questions

0 votes
0 votes
1 answer
2
CJ147 asked Dec 3, 2018
432 views
What is the best way to solve a 0/1 knapsack problem? Any trick to solve it without wasting much time?Not How to
0 votes
0 votes
0 answers
3
karan25gupta asked Apr 17, 2019
690 views
In 0/1 knapsack problem ,suppose if maximum weight is given as W and we are asked to find out max profit then * IS IT NECESSARY THAT THE TOTAL WEIGHT SHOULD BE EXACTLY EQ...