Skip to content

Commit

Permalink
create daily folder 2021-08-26
Browse files Browse the repository at this point in the history
  • Loading branch information
rabbittee committed Aug 26, 2021
1 parent 38fe757 commit 56195d6
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 1 deletion.
57 changes: 57 additions & 0 deletions 2021-08/2021-08-26 (day39)/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# 70. Climbing Stairs

`Easy`

## Description

<p>You are climbing a staircase. It takes <code>n</code> steps to reach the top.</p>

<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>

<p>&nbsp;</p>
<p><strong>Example 1:</strong></p>

<pre>
<strong>Input:</strong> n = 2
<strong>Output:</strong> 2
<strong>Explanation:</strong> There are two ways to climb to the top.
1. 1 step + 1 step
2. 2 steps
</pre>

<p><strong>Example 2:</strong></p>

<pre>
<strong>Input:</strong> n = 3
<strong>Output:</strong> 3
<strong>Explanation:</strong> There are three ways to climb to the top.
1. 1 step + 1 step + 1 step
2. 1 step + 2 steps
3. 2 steps + 1 step
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
<li><code>1 &lt;= n &lt;= 45</code></li>
</ul>


---

### Topic Tags

[math]: https://img.shields.io/badge/-Math-EF9A9A
[dynamic-programming]: https://img.shields.io/badge/-Dynamic%20Programming-B39DDB
[memoization]: https://img.shields.io/badge/-Memoization-81D4FA

![Math][math]

![Dynamic Programming][dynamic-programming]

![Memoization][memoization]

---

##### [original question](https://leetcode.com/problems/climbing-stairs)
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,15 @@
| 036 | [121][0121] | [Best Time to Buy and Sell Stock](<./2021-08/2021-08-23%20(day36)>) | ![Easy][Easy] | Array; Dynamic Programming |
| 037 | [122][0122] | [Best Time to Buy and Sell Stock II](<./2021-08/2021-08-24%20(day37)>) | ![Easy][Easy] | Array; Dynamic Programming; Greedy |
| 038 | [123][0123] | [Best Time to Buy and Sell Stock III](<./2021-08/2021-08-25%20(day38)>) | ![Hard][Hard] | Array; Dynamic Programming |
| 039 | [70][0070] | [Climbing Stairs](<./2021-08/2021-08-26%20(day39)>) | ![Easy][Easy] | Math; Dynamic Programming; Memoization |



---

### Summary

![](https://img.shields.io/badge/Easy-21-brightgreen)
![](https://img.shields.io/badge/Easy-22-brightgreen)

![](https://img.shields.io/badge/Medium-14-orange)

Expand All @@ -81,6 +82,7 @@
[0048]: https://leetcode.com/problems/rotate-image/
[0049]: https://leetcode.com/problems/group-anagrams/
[0064]: https://leetcode.com/problems/minimum-path-sum/
[0070]: https://leetcode.com/problems/climbing-stairs/
[0083]: https://leetcode.com/problems/remove-duplicates-from-sorted-list/
[0094]: https://leetcode.com/problems/binary-tree-inorder-traversal/
[0098]: https://leetcode.com/problems/validate-binary-search-tree/
Expand Down
1 change: 1 addition & 0 deletions problem_list.log
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@
36,121,https://leetcode.com/problems/best-time-to-buy-and-sell-stock/,2021-08-23,Best Time to Buy and Sell Stock,Easy,Array;Dynamic Programming
37,122,https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/,2021-08-24,Best Time to Buy and Sell Stock II,Easy,Array;Dynamic Programming;Greedy
38,123,https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii/,2021-08-25,Best Time to Buy and Sell Stock III,Hard,Array;Dynamic Programming
39,70,https://leetcode.com/problems/climbing-stairs/,2021-08-26,Climbing Stairs,Easy,Math;Dynamic Programming;Memoization

0 comments on commit 56195d6

Please sign in to comment.