lab_dict
Devious Dictionaries: Cleverness Through Association
|
Contains Fibonacci-number generating functions both utilizing and not utilizing memoization. More...
Functions | |
unsigned long | fib (unsigned long n) |
Calculates the nth Fibonacci number where the zeroth is defined to be 0. More... | |
unsigned long | memoized_fib (unsigned long n) |
Calculates the nth Fibonacci number where the zeroth is defined to be 0. More... | |
Contains Fibonacci-number generating functions both utilizing and not utilizing memoization.
unsigned long fib | ( | unsigned long | n | ) |
Calculates the nth Fibonacci number where the zeroth is defined to be 0.
n | Which number to generate. |
unsigned long memoized_fib | ( | unsigned long | n | ) |
Calculates the nth Fibonacci number where the zeroth is defined to be 0.
This version utilizes memoization.
n | Which number to generate. |