Problem 292. Infernal Recursion
Solution Stats
Problem Comments
-
4 Comments
is there a story as to why this is "infernal"?
I hate recursion, so it is all infernal to me! Iteration is the way to go...
Test suite could helpfully include n=1 and n=2 tests. I thought that it needed extra complexity to handle these, but @bmtran's top solution shows it doesn't.
I spend a lot of time to get the correct R from the example. The issue is that you say k = 5/9 instead of 4/9 . Just a typo to correct . Thanks
Solution Comments
-
2 Comments
-
1 Comment
it cost much too time,so .....
-
1 Comment
Fails for both n=1 and n=2?
-
2 Comments
holy moly, you posted this one mere seconds after i posted mine.
Fails for n=1?
-
2 Comments
that was a photo-finish :)
OK for both n=1 and n=2.
Problem Recent Solvers76
Suggested Problems
-
First non-zero element in each column
767 Solvers
-
282 Solvers
-
341 Solvers
-
322 Solvers
-
409 Solvers
More from this Author6
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!