• retagged by
1,050 views
0 0 votes
Can we solve fractional knapsack using dynamic programming?

1 Answer

0 0 votes

Yes.... Dynamic method tries out all the possibility  and choose the best out of it....

Moreover , Greedy approach is kind of a subset to the dynamic method....

So any Greedy problem can be solved using Dynamic method...

 

Position:
Show:

Related questions

0 0 votes
0 0 answers
1.0k
1.0k views
karan25gupta asked Apr 17, 2019
1,033 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...
0 0 votes
0 0 answers
1.4k
1.4k views
VIKAS TIWARI asked Dec 13, 2017
1,396 views
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 ...
0 0 votes
1 1 answer
473
473 views
Shubham Sharma 2 asked Sep 9, 2025
473 views
Arrange the following steps in the correct order to solve the Knapsack problem using Dynamic Programming.Define the base case when the capacity is zero ($0$) or no items ...