Recursion
Recursion
Recursion
Recursion
Properties of a Recursive Definition
Recursive Algorithm and Recursive Functions
Direct and Indirect Recursion
Designing a Recursive Algorithms General Steps
Exercise on recursive functions
0! = 1 (1)
1 Every recursive definition must have one (or more) base cases.
A function that calls itself is called a recursive function. That is, the
body of the recursive function contains a statement that causes the
same function to execute again before completing the current call.
Recursive algorithms are implemented using recursive functions.
The down arrow represents the successive calls to the function fact, and
the upward arrows represent the values returned to the caller, that is, the
calling function.
Recursion Data Structures and Algorithms May 15th, 2021 9 / 13
Note the following from the above example