What is the time complexity of algorithm to solve fractional knapsack problem using greedy paradigm?

1 answer

Answer

1004001

2026-03-17 16:55

+ Follow

if the objects in the knapsack are already being sorted then it requires only O(n) times to arrange the objects...so total time require by the knapsack problem is

T(n)=(nlogn) because sorting the objects require O(nlogn) time...Remaining is to run for n objects O(n). Hence, bounded by O(nlogn)

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.