lab_dict
Devious Dictionaries: Cleverness Through Association
|
Contains factorial-calculating functions both utilizing and not utilizing memoization. More...
Functions | |
unsigned long | fac (unsigned long n) |
Calculates the factorial of the given number. More... | |
unsigned long | memoized_fac (unsigned long n) |
Calculates the factorial of the given number. More... | |
Contains factorial-calculating functions both utilizing and not utilizing memoization.
unsigned long fac | ( | unsigned long | n | ) |
Calculates the factorial of the given number.
n | Number to calculate factorial for. |
unsigned long memoized_fac | ( | unsigned long | n | ) |
Calculates the factorial of the given number.
This version utilizes memoization.
n | Number to calculate factorial for. |