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 Solvers4
Suggested Problems
-
2268 Solvers
-
98 Solvers
-
Replace multiples of 5 with NaN
390 Solvers
-
Create the following sequence : 0 1 1 4 9 25 64 169 ...
100 Solvers
-
242 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!