Chapter 13: Recursion
Mutual Recursive
- Mutual recursion occurs when a set of cooperating methods
calls each other cyclically.
- Example: isItEven and isItOdd methods.
More Recursion Practice
- Solve the Towers of Hanoi recursively.
- Write a recursive method that reverses a string.
- Write a recursive method to decide if one string is a substring
of a second string.
- Find the largest element of an array using recursion.
- Write a recursive method to generate all subsets of a string.
Lecture Code