A

Admin • 833K Points
Coach

Q. The main time taking step in fractional knapsack problem is

  • (A) breaking items into fraction
  • (B) adding items into knapsack
  • (C) sorting
  • (D) looping through sorted items

Explanation by: Admin

the main time taking step is to sort the items according to their value/weight ratio. it defines the time complexity of the code.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.