![]() |
| Example of a recursive tree |
Definitions:
Data Structure: The organization of data for the purpose of making it easier to use.
Recursive call: The statement inside the function definition in which the function calls itself.
Recursion: The process of calling a function that is already executing
Recursion definition: A definition which defines something in terms of itself, To be useful it must contain a base case that is not recursive. Recursive definitions often provide a easier way to express complex data structures.
Recursive call: The statement that calls an already executing function.
Base case: A branch of conditional statement in a recursive function that does not give rise to further recursive calls, not having a base case will result ion infinite recursion.
Infinite recursion: A function that calls itself recursively without ever reaching any base case. Eventually, it will cause a run time error.
Source: lecture notes and wikipedia

No comments:
Post a Comment