Skip to content

Commit 8d90b23

Browse files
authored
Update Fractional Knapsack.md
1 parent da25afd commit 8d90b23

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

en/Greedy Algorithms/Fractional Knapsack.md

+1-7
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,7 @@ Given a set of items, each with weight and a value, determine the number of each
88

99
#### Time Complexity
1010

11-
O(log n) Worst Case
12-
O(1) Best Case (If middle element of initial array is the target element)
13-
14-
#### Space Complexity
15-
16-
O(1) For iterative approach
17-
O(1) For recursive approach *if tail call optimization is used*, O(log n) due to recursion call stack, otherwise
11+
O(nlog n) Worst Case
1812

1913
#### Example
2014

0 commit comments

Comments
 (0)