You can climb 1 or 2 steps at a time. Return how many distinct ways to reach step `n`. Variant **#1**.
Example 1
Input: n = 4
Output: 5
Constraints
Acceptance: 63% · Topics: dynamic-programming, math
← All practice problems