← ALL NOTES
Math

70. Climbing Stairs

You reach step n either from n−1 (one step) or from n−2 (a double), so ways(n) = ways(n−1) + ways(n−2) — Fibonacci, wearing a staircase. Since each value depends only on the previous two, there's no…

Loading…