Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a2a9c75

Browse files
Add 70_ClimbingStairs to LeetCode for Saturday Review.
1 parent cf3ab04 commit a2a9c75

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

‎LeetCode/Attempting/70_ClimbingStairs/70_ClimbingStairs.js

Whitespace-only changes.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# [70. Climbing Stairs](https://leetcode.com/problems/climbing-stairs/)
2+
3+
You are climbing a stair case. It takes n steps to reach to the top.
4+
5+
Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?
6+
7+
Note: Given n will be a positive integer.
8+
9+
Example 1:
10+
11+
```
12+
Input: 2
13+
Output: 2
14+
Explanation: There are two ways to climb to the top.
15+
1. 1 step + 1 step
16+
2. 2 steps
17+
```
18+
19+
Example 2:
20+
21+
```
22+
Input: 3
23+
Output: 3
24+
Explanation: There are three ways to climb to the top.
25+
1. 1 step + 1 step + 1 step
26+
2. 1 step + 2 steps
27+
3. 2 steps + 1 step
28+
```
29+
30+
---
31+
32+
| Started | Last revisited | Completed |
33+
| ----------- | -------------- | ----------- |
34+
| 25-Jan-2019 | 25-Jan-2019 | dd-MMM-yyyy |

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /