Chapter 14 - Recursion Flashcards

1
Q

What makes a function recursive?

A

A function which contains one or more calls to itself.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the purpose of the base case?

A

The smallest or simplest possible instance of a problem.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the purpose of the recursive case(s)?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly