Skip to content

Commit afda566

Browse files
author
siddharth raturi
authored
Update Fractional Knapsack.cpp
1 parent 082d142 commit afda566

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

C++/Algorithms/Greedy-Algorithms/Fractional Knapsack.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ float fractionalKnapsack(int W, struct Item a[], int n)
2727

2828
for (int i = 0; i < n; i++)
2929
{
30-
// If adding Item won't overflow, add it completely
30+
// If adding Item won't overflow, add it completely and want to change it
3131
if (current_weight + a[i].weight <= W)
3232
{
3333
current_weight += a[i].weight;

0 commit comments

Comments
 (0)