|
There's an error in counting calls. It should be: fibo(x) = fibo(36 - n + 1) calls, so fibo(2) = fibo(35) calls. Respectively, fibo(30) = fibo(7) = 13 calls. |
|
There's an error in counting calls. It should be: fibo(x) = fibo(36 - n + 1) calls, so fibo(2) = fibo(35) calls. Respectively, fibo(30) = fibo(7) = 13 calls. |
Markdown Basics
Asked: 26 Mar '12, 18:50
Seen: 252 times
Last updated: 27 Mar '12, 12:54
I noticed this as well. The quiz had us figure out how many times we had to call fib(30), and the answer was 13.
13 = fib(7) = fib(36 - 30 + 1) != fib(36 - 30 -1) = 5
yes, exactly..