Skip to content

Commit 6778d69

Browse files
committed
update
1 parent 695f138 commit 6778d69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

✅ Pattern 15: 0-1 Knapsack (Dynamic Programming).md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4469,7 +4469,7 @@ console.log(
44694469
### Top-down Dynamic Programming with Memoization
44704470
We can use an array to store the already solved <i>subproblems</i>.
44714471
4472-
The two changing values to our <i>recursive function<i> are the two indexes, `index1` and `index2`. Therefore, we can store the results of all the <i>subproblems</i> in a two-dimensional array. (Another alternative could be to use a <i>hash-table</i> whose key would be a <i>string</i> (`index1` + `|` + `index2`)).
4472+
The two changing values to our <i>recursive function</i> are the two indexes, `index1` and `index2`. Therefore, we can store the results of all the <i>subproblems</i> in a two-dimensional array. (Another alternative could be to use a <i>hash-table</i> whose key would be a <i>string</i> (`index1` + `|` + `index2`)).
44734473
44744474
Here is the code:
44754475
```js

0 commit comments

Comments
 (0)