We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 67c9007 commit 22cd7eeCopy full SHA for 22cd7ee
1 file changed
dynamic-programming/0-1-knapsack.js
@@ -3,6 +3,7 @@
3
*/
4
// assume Weight = [];
5
// assume value = [];
6
+// Order(nc)
7
const KS = (index, totalWeight) => {
8
if (index === 0 || totalWeight === 0) return 0;
9
if(weight[index] > totalWeight) {
0 commit comments