Problem 47154. Climbing the stairs
Solution Stats
Solution Comments
-
1 Comment
Mayank Bajpai
on 3 Nov 2020
Correct idea. But take care of the overflow. This sequence just explodes at high values of n. Try enhancing the modular arithmetic in it.
-
1 Comment
Mayank Bajpai
on 1 Nov 2020
I didn't expected the recursion to work because of it's exponential time complexity O(3^(n-3)). But it worked :O.
Nicely written code. ^_^
Problem Recent Solvers5
Suggested Problems
-
16564 Solvers
-
Back to basics 23 - Triangular matrix
782 Solvers
-
Arrange vector in ascending order
721 Solvers
-
6520 Solvers
-
146 Solvers
More from this Author5
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!