LeetCode 70_climbing stairs(Java)
dp问题
难度:easy
Question
You are climbing a staircase. It takes n steps to reach the top.
Each time you can either climb 1 or 2 steps.
In how many distinct ways can you climb to the top?
1 | Example 1: |
1 | Constraints: |
Answer
1 | class Solution { |
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.
Comment