easy Dynamic Programming
Climbing Stairs
You climb a staircase of `n` steps, taking 1 or 2 steps at a time. Return the number of distinct ways to reach the top. Example: n = 3 → 3 (1+1+1, 1+2, 2+1).
runs in your browser
You climb a staircase of `n` steps, taking 1 or 2 steps at a time. Return the number of distinct ways to reach the top. Example: n = 3 → 3 (1+1+1, 1+2, 2+1).