Climbing Stairs - LeetCode
Wed Jun 05 2024 07:16:25 GMT+0000 (Coordinated Universal Time)
Saved by @devdutt
https://leetcode.com/problems/climbing-stairs/Wed Jun 05 2024 07:16:25 GMT+0000 (Coordinated Universal Time)
Saved by @devdutt
https://leetcode.com/problems/climbing-stairs/
Comments
@devdutt - Wed Jun 05 2024 07:16:55 GMT+0000 (Coordinated Universal Time)To calculate the number of ways to climb the stairs, we can observe that when we are on the nth stair, we have two options: either we climbed one stair from the (n-1)th stair or we climbed two stairs from the (n-2)th stair.