created: 12/23/02
This chapter introduces recursion. Previous chapters have discussed the fundamental control mechanisms of sequence, alternation (if-else), and iteration (while). Recursion is another control mechanism. Sometimes problems are stated in a recursive fashion, and a program that solves the problem is easily written using recursion.
Forget programming for a while. Think about a real-world problem that does not involve computers: