Unit 6 Fibonacci counting calls error

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.

asked 26 Mar '12, 18:50

Uglje%C5%A1a%20Ija%C4%8Di%C4%87's gravatar image

Uglješa Ijačić
3912622
accept rate: 71%

edited 26 Mar '12, 19:37

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

(26 Mar '12, 19:28) ccesare ccesare's gravatar image

yes, exactly..

(26 Mar '12, 19:32) Uglješa Ijačić Uglje%C5%A1a%20Ija%C4%8Di%C4%87's gravatar image

2 Answers:

It is in the video, but I'm suggesting it should be 36-n+1. Check it out yourself by computing fibonacci..

link

answered 26 Mar '12, 19:22

Uglje%C5%A1a%20Ija%C4%8Di%C4%87's gravatar image

Uglješa Ijačić
3912622

I see, thanks!

(27 Mar '12, 12:54) christopher ... christopher%20bijalba's gravatar image

Is it not 36-n-1?

you have 36-n+1

link

answered 26 Mar '12, 19:20

christopher%20bijalba's gravatar image

christopher ...
2.3k71744

Your answer
Question text:

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×15,290
×683
×19
×16
×2
×1

Asked: 26 Mar '12, 18:50

Seen: 252 times

Last updated: 27 Mar '12, 12:54