File tree 2 files changed +10
-9
lines changed
2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 29
29
* 1 阶 + 2 阶
30
30
* 2 阶 + 1 阶
31
31
32
- # 视频讲解
32
+ ## 算法公开课
33
33
34
- ** 《代码随想录》算法视频公开课:[ 带你学透动态规划-爬楼梯|LeetCode:70.爬楼梯)] ( https://www.bilibili.com/video/BV17h411h7UH ) ,相信结合视频在看本篇题解,更有助于大家对本题的理解** 。
34
+ ** [ 《代码随想录》算法视频公开课] ( https://programmercarl.com/other/gongkaike.html ) :[ 带你学透动态规划-爬楼梯|LeetCode:70.爬楼梯)] ( https://www.bilibili.com/video/BV17h411h7UH ) ,相信结合视频在看本篇题解,更有助于大家对本题的理解** 。
35
35
36
36
37
37
## 思路
@@ -522,3 +522,4 @@ impl Solution {
522
522
<a href =" https://programmercarl.com/other/kstar.html " target =" _blank " >
523
523
<img src =" ../pics/网站星球宣传海报.jpg " width =" 1000 " />
524
524
</a >
525
+
Original file line number Diff line number Diff line change @@ -127,8 +127,8 @@ public:
127
127
128
128
## 其他语言版本
129
129
130
+ ### Java:
130
131
131
- Java:
132
132
```java
133
133
class Solution {
134
134
public int climbStairs(int n) {
@@ -148,7 +148,7 @@ class Solution {
148
148
}
149
149
```
150
150
151
- Python3:
151
+ ### Python3:
152
152
153
153
154
154
``` python
@@ -166,8 +166,8 @@ class Solution:
166
166
return dp[n]
167
167
```
168
168
169
+ ### Go:
169
170
170
- Go:
171
171
``` go
172
172
func climbStairs (n int ) int {
173
173
// 定义
@@ -189,7 +189,8 @@ func climbStairs(n int) int {
189
189
}
190
190
```
191
191
192
- JavaScript:
192
+ ### JavaScript:
193
+
193
194
``` javascript
194
195
var climbStairs = function (n ) {
195
196
const dp = new Array (n + 1 ).fill (0 );
@@ -206,7 +207,7 @@ var climbStairs = function(n) {
206
207
};
207
208
```
208
209
209
- TypeScript:
210
+ ### TypeScript:
210
211
211
212
``` typescript
212
213
function climbStairs(n : number ): number {
@@ -226,7 +227,7 @@ function climbStairs(n: number): number {
226
227
};
227
228
```
228
229
229
- Rust:
230
+ ### Rust:
230
231
231
232
``` rust
232
233
impl Solution {
@@ -250,4 +251,3 @@ impl Solution {
250
251
<a href="https://programmercarl.com/other/kstar.html " target="_ blank">
251
252
<img src =" ../pics/网站星球宣传海报.jpg " width =" 1000 " />
252
253
</a>
253
-
You can’t perform that action at this time.
0 commit comments