Back to DSA sheet
Climbing Stairs
EasyDynamic ProgrammingYou can climb 1 or 2 steps at a time. Count the distinct ways to reach the top of n stairs.
Constraints
- 1 <= n <= 45
Sheets
Blind 75Grind 75NeetCode 150NeetCode 250
climbing-stairs.cpp
Loading editor
Custom input (stdin)
Output
Run your code to see its output.