Skip to content

Commit 660c737

Browse files
authored
feat(dynamic programming -> knapsack): Update invalid example comment
1 parent 19b4ced commit 660c737

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dynamic_programming/knapsack.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @returns Maximum value subset such that sum of the weights of this subset is smaller than or equal to capacity
77
* @throws If weights and values arrays have different lengths
88
* @see [Knapsack](https://www.geeksforgeeks.org/0-1-knapsack-problem-dp-10/)
9-
* @example knapsack(3, [3, 4, 5], [30, 50, 60]) // Output: 90
9+
* @example knapsack(3, [3, 4, 5], [30, 50, 60]) // Output: 30
1010
*/
1111

1212
export const knapsack = (

0 commit comments

Comments
 (0)