CS2
Recursion
9
More than one base case
n
There is no need to have just one base case
n
• The (mathematical) definition of the Fibonacci
numbers is a recursive definition with two base
cases
n
n
n
• This gives the sequence 1, 1, 2, 3, 5, 8, 13, 21,
34, …
n