Learnings of the Week [January 5-9, 2009]
In this week, our lesson is about Recursion.
RECURSION
PARTS OF THE RECURSIVE FUNCTION
| Base Case | This is the part of the recursive function that is found on the if clause. This contains the condition that should be satisfied at one point of execution to terminate the repetitive process done by the recursive function. |
| General Case | This is the part of the recursive function that is found on the else-clause. This contains the function call of the recursive function to itself. |
DIRECT RECURSION
Direct Recursions are recursive functions that can call itself through a function call directly inside the body of the function.
The examples presented on the earlier part of this presentation are examples of direct recursions.
INDIRECT RECURSION
Indirect Recursions are recursive functions that can call another functions outside its function.
RAE ANGELINE S. PALEN
IV - Rizal


0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home