Skip to content

Commit 70b1df8

Browse files
committed
Added README.md file for Climbing Stairs
1 parent 8db8f3f commit 70b1df8

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

70-climbing-stairs/README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<h2><a href="https://leetcode.com/problems/climbing-stairs">Climbing Stairs</a></h2> <img src='https://img.shields.io/badge/Difficulty-Easy-brightgreen' alt='Difficulty: Easy' /><hr><p>You are climbing a staircase. It takes <code>n</code> steps to reach the top.</p>
2+
3+
<p>Each time you can either climb <code>1</code> or <code>2</code> steps. In how many distinct ways can you climb to the top?</p>
4+
5+
<p>&nbsp;</p>
6+
<p><strong class="example">Example 1:</strong></p>
7+
8+
<pre>
9+
<strong>Input:</strong> n = 2
10+
<strong>Output:</strong> 2
11+
<strong>Explanation:</strong> There are two ways to climb to the top.
12+
1. 1 step + 1 step
13+
2. 2 steps
14+
</pre>
15+
16+
<p><strong class="example">Example 2:</strong></p>
17+
18+
<pre>
19+
<strong>Input:</strong> n = 3
20+
<strong>Output:</strong> 3
21+
<strong>Explanation:</strong> There are three ways to climb to the top.
22+
1. 1 step + 1 step + 1 step
23+
2. 1 step + 2 steps
24+
3. 2 steps + 1 step
25+
</pre>
26+
27+
<p>&nbsp;</p>
28+
<p><strong>Constraints:</strong></p>
29+
30+
<ul>
31+
<li><code>1 &lt;= n &lt;= 45</code></li>
32+
</ul>

0 commit comments

Comments
 (0)