Skip to content

Commit b6d9a51

Browse files
authored
Update README.md
1 parent 58e1def commit b6d9a51

File tree

1 file changed

+4
-1
lines changed
  • Knapsack/0-1 Knapsack/Dynamic Method

1 file changed

+4
-1
lines changed

Knapsack/0-1 Knapsack/Dynamic Method/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ we take maximum of (25, 40 + DP[2][6-3])
6565
= 65
6666
```
6767

68-
## ⏰ Complexity Analysis:
68+
## 💻 Input and Output
69+
![](https://github.com/abhisheks008/PyAlgo-Tree/blob/main/Knapsack/0-1%20Knapsack/Images/knapsack1.PNG)
70+
71+
## ⏰ Complexity Analysis
6972
- **Time Complexity:** `O(N*W)`. [where ‘N’ is the number of weight element and ‘W’ is capacity. As for every weight element we traverse through all weight capacities 1<=w<=W.]
7073
- **Auxiliary Space :** `O(N*W)`. [The use of 2-D array of size `‘N*W’`.]
7174

0 commit comments

Comments
 (0)