更新图片链接
This commit is contained in:
4
problems/0746.使用最小花费爬楼梯.md
Normal file → Executable file
4
problems/0746.使用最小花费爬楼梯.md
Normal file → Executable file
@@ -52,7 +52,7 @@
|
||||
|
||||
请你计算并返回达到楼梯顶部的最低花费。
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
## 思路
|
||||
@@ -112,7 +112,7 @@ dp[i - 2] 跳到 dp[i] 需要花费 dp[i - 2] + cost[i - 2]。
|
||||
|
||||
拿示例2:cost = [1, 100, 1, 1, 1, 100, 1, 1, 100, 1] ,来模拟一下dp数组的状态变化,如下:
|
||||
|
||||

|
||||

|
||||
|
||||
如果大家代码写出来有问题,就把dp数组打印出来,看看和如上推导的是不是一样的。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user