Skip to content

Conversation

hiteshskp
Copy link
Contributor

As 1 <= n <= 45 we can use Binet’s Formula (Fibonacci closed form) PS: this won't work for n>70 or 100 The "climb stairs" problem is equivalent to computing the nth Fibonacci number (with a slight index shift), where: F(0) = 0
F(1) = 1
F(n) = F(n-1) + F(n-2)
The number of ways to climb n stairs is the (n + 1)th Fibonacci number.

As 1 <= n <= 45 we can use Binet’s Formula (Fibonacci closed form) PS: this won't work for n>70 or 100
The "climb stairs" problem is equivalent to computing the nth Fibonacci number (with a slight index shift), where:
F(0) = 0
F(1) = 1
F(n) = F(n-1) + F(n-2)
The number of ways to climb n stairs is the (n + 1)th Fibonacci number.
@hiteshskp
Copy link
Contributor Author

@kamyu104 need some approvals PLEASE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant