A

Admin • 833K Points
Coach

Q. Time complexity of fractional knapsack problem is

  • (A) o(n log n)
  • (B) o(n)
  • (C) o(n2)
  • (D) o(nw)

Explanation by: Admin

as the main time taking a step is of sorting so it defines the time complexity of our code. so the time complexity will be o(n log n) if we use quick sort for sorting.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.