70. Climbing Stairs
Practice Climbing Stairs for free on NudgeCode: Easy, Dynamic Programming pattern. Write it in Python or JavaScript, run the tests in your browser, and ask for a hint when you are stuck.
A staircase has n steps. Each move climbs either 1 or 2 steps. Return how many different sequences of moves take you exactly to the top.
Example
n = 2 -> 2 (1+1, 2)
n = 3 -> 3 (1+1+1, 1+2, 2+1)
Constraints
- 1 <= n <= 45