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
-
The Goldbach Conjecture, Part 2
1911 Solvers
-
1168 Solvers
-
What is the distance from point P(x,y) to the line Ax + By + C = 0?
339 Solvers
-
51 Solvers
-
Transform a Decimal number into a Septimal number
25 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!