Skip to content

Fibonacci and Recursive Function Calls

fanaugen edited this page Sep 6, 2012 · 7 revisions

In reply to this question about this exercise. Diagrams made with Lucidchart.

The Beanstalk

The growing beanstalk is an example of the Fibonacci sequence, which is defined recursively

… simply because there's no other way of defining it. The n-th Fibonacci number is the sum of n's predecessor and its predecessor's predecessor, so without those two you can't calculate the n-th one.

Clone this wiki locally