All challenges
Algorithm challenge · DSA
Climbing Stairs
Difficulty
easy
Time
~15m
Format
Single
Grading
Auto-graded
#python#javascript#typescript#go#java#cpp#rust#dsa#dynamic-programming#math
Mission file // read carefullyeasy
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?
n = 3 => 3 (1+1+1, 1+2, 2+1)
Build with
climbStairs(n: int) → intPythonJavaScriptTypeScriptGoJavaC++Rust
3 tests · 1 hidden
Auto-graded on submit
Start challenge
Sign in to save your progress.