Skip to content

Commit 22cd7ee

Browse files
committed
added time comeplexity
1 parent 67c9007 commit 22cd7ee

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

dynamic-programming/0-1-knapsack.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
*/
44
// assume Weight = [];
55
// assume value = [];
6+
// Order(nc)
67
const KS = (index, totalWeight) => {
78
if (index === 0 || totalWeight === 0) return 0;
89
if(weight[index] > totalWeight) {

0 commit comments

Comments
 (0)