2: Recursion
Unit Introduction
This unit introduces the learner to the processes that repeat themselfs in a self-similar way. The processes can either call themselves directly or indirectly during their execution. The unit will enable the learner to understand the recursion process and solve problems that are recursive in nature.
Unit Objectives
Upon completion of this unit the learner should be able to:
- develop algorithms for recursive programs
- implement recursive formulation of a problem
- explain recursion as a form of iteration
Key Terms
- Recursion: This is a process whereby a method calls itself so as to achieve repetitious
- Base case: Is a boolean test at which the recursion ceases to “wind up” and starts to “unwind”.
- Recursive step: Is a method call which causes the recursion to “repeat” on each successive iteration (unless the base case is reached).
Learning Activities