1. Computer Science Engineering (CSE)
  2. Design and Analysis of Algorithms
  3. Fractional knapsack problem is solved mo...
Q.

Fractional knapsack problem is solved most efficiently by which of the following algorithm?

A. divide and conquer
B. dynamic programming
C. greedy algorithm
D. backtracking
Answer» C. greedy algorithm
Explanation: greedy algorithm is used to solve this problem. we first sort items according to their value/weight ratio and then add item with highest ratio until we cannot add the next item as a whole. at the end, we add the next item as much as we can.

Discussion