We have given items i1, i2, ..., in (item we want to put in our bag) with associated weights w1, w2, ..., wn and profit values P1 , P2 ,..., Pn. Now problem is how we can maximize the total benefit given capacity of bag is C?
All Answers
total answers (1)
Algorithm:
C++ implementation of fractional knapsack problem
Output
need an explanation for this answer? contact us directly to get an explanation for this answer