Problem
Submissions

Solution: Climbing Stairs

Statement

Naive approach

A naive approach to solve this problem would be to find all the possible ways to climb the stairs. Given that you can only climb either 11 or 22 steps at a time, we can say that the number of ways to climb nn stairs is the sum of the following:

  • the number of ways to reach the (n1)th(n−1)^{th} stair, since we can then climb 11
...
Problem
Submissions

Solution: Climbing Stairs

Statement

Naive approach

A naive approach to solve this problem would be to find all the possible ways to climb the stairs. Given that you can only climb either 11 or 22 steps at a time, we can say that the number of ways to climb nn stairs is the sum of the following:

  • the number of ways to reach the (n1)th(n−1)^{th} stair, since we can then climb 11
...