Chapter 14 - Recursion Flashcards
1
Q
What makes a function recursive?
A
A function which contains one or more calls to itself.
2
Q
What is the purpose of the base case?
A
The smallest or simplest possible instance of a problem.
3
Q
What is the purpose of the recursive case(s)?
A
4
Q
What is the delegation metaphor?
A
No matter what function is involved, a function is involved, a function call is like calling an assistant, giving them a task, and some room to work, and waiting for them to come back with a result.