Skip to content

Commit

Permalink
Update dynamic_programming/01knapsack_recursive.dart
Browse files Browse the repository at this point in the history
Co-authored-by: Parowicz <[email protected]>
  • Loading branch information
mohammadreza490 and Parowicz authored Feb 9, 2021
1 parent 01de178 commit 71ab3fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dynamic_programming/01knapsack_recursive.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ int knapSackProblem(int capacity, List<int> values, List<int> weights,
capacity - currentWeight, values, weights, numberOfItems - 1),
knapSackProblem(capacity, values, weights, numberOfItems - 1));
} else {
return knapSackProblem(numberOfItems - 1, capacity, values, weights);
return knapSackProblem(capacity, values, weights, numberOfItems - 1);
}
}

Expand Down

0 comments on commit 71ab3fe

Please sign in to comment.