Math Fundamentals18 sections · 814 units
Open in Course

Problem - Climbing Stairs

Counting paths with steps

You are climbing a staircase with nn steps. Each time you can climb 1 or 2 steps. In how many distinct ways can you reach the top?

For n=3n = 3: you can go 1+1+1, 1+2, or 2+1. That is 3 ways. This problem connects counting to recursion.