Chapter 12 Recursion Flashcards

1
Q

A recursive function must have some way to control the number of times it repeats.
True or False?

A

True

Chapter 1 2Q

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

Which of the following describes the base case in a recursive solution?

a. the case in which the problem is solved through recursion
b. a case in which the problem can be solved without recursion
c. the way to return the main function
d. the way to stop the recursion

A

a case in which the problem can be solved without recursion

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

Each time a function is called in a recursive solution, the system incurs overhead that is not incurred with a loop.
True or False?

A

True

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

Recursive algorithms are always more concise and efficient than iterative algorithms.
True or False

A

False

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