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
-
242 Solvers
-
301 Solvers
-
Set the array elements whose value is 13 to 0
1179 Solvers
-
317 Solvers
-
156 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!