We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 442f233 commit 3331c34Copy full SHA for 3331c34
python/min-cost-climbing-stairs.md
@@ -73,7 +73,7 @@ Using dynamic programming, we fill an array with the minimum costs from the base
73
```python
74
def minCostClimbingStairs(cost):
75
n = len(cost)
76
- dp = [0] * (n + 1)
+ dp = [0] * (n + 2)
77
78
# Start calculating the minimum cost from the top to the base.
79
for i in range(n - 1, -1, -1):
0 commit comments