**Argument:** This is the index of the Fibonacci number. So an argument of 14 with return 377, the fifteenth number in the sequence.

**Note:** Each call to Fibonacci() computes the entire sequence up to the specified point. We can instead store them in an array as we proceed.

**Lookup table:** Often, mathematical methods are slow. Using a table to store (memoize) their results tends to yield speed boosts.

**Here:** We can access Fibonacci numbers with just an array access, an element load, by using the "sequence" array.

© 2007-2020 Sam Allen. Every person is special and unique. Send bug reports to info@dotnetperls.com.

Home

Dot Net Perls