Skip to content

Commit c4629a7

Browse files
authored
Update knapsack.ts
1 parent 660c737 commit c4629a7

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: 30
9+
* @example knapsack(11, [1, 3, 4, 5, 6], [10, 30, 80, 50, 60]) // Output: 150
1010
*/
1111

1212
export const knapsack = (

0 commit comments

Comments
 (0)