Exam 13: Recursion

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

If the problem cannot be solved now, then a recursive function reduces it to a smaller but similar problem and _____.

Free
(Multiple Choice)
4.8/5
(30)
Correct Answer:
Verified

D

If a recursive solution is evident for a particular problem, and the recursive algorithm does not slow system performance by an intolerable amount, then recursion would be a good design choice.

Free
(True/False)
4.7/5
(40)
Correct Answer:
Verified

True

Each time a function is called, the system incurs overhead that is not necessary with a loop.

Free
(True/False)
4.9/5
(34)
Correct Answer:
Verified

True

Usually, a problem is reduced by making the value of one or more parameters _______________ with each recursive call.

(Short Answer)
4.8/5
(32)

What is referred to as the recursive case?

(Multiple Choice)
4.7/5
(37)

Recursive functions are _____ iterative algorithms.

(Multiple Choice)
4.9/5
(36)

A recursive function includes _____ which are not necessary in a loop structure.

(Multiple Choice)
4.8/5
(38)

Recursive algorithms are more concise and efficient than iterative algorithms.

(True/False)
4.8/5
(39)

Each time a function is called, the system incurs _______________ that is not necessary with a loop.

(Short Answer)
4.8/5
(34)

A base case is not necessary for all recursive algorithms.

(True/False)
4.8/5
(44)

There can be several functions involved in the recursion.

(True/False)
4.9/5
(29)

Recursive function calls are _______________ efficient than loops.

(Short Answer)
4.7/5
(34)

A problem can be solved with recursion if it can be broken down into _____ problems.

(Multiple Choice)
4.8/5
(43)

A function is called from the main function and then it calls itself five times. The depth of recursion is _______________.

(Short Answer)
4.9/5
(30)

A function is called from the main function for the first time. It then calls itself seven times. What is the depth of recursion?

(Multiple Choice)
4.8/5
(39)

In many cases a solution using recursion is more evident than a solution using a loop.

(True/False)
4.8/5
(35)

When function A calls function B, which in turn calls function A, it is known as indirect recursion.

(True/False)
4.9/5
(38)

What is referred to as the base case?

(Multiple Choice)
4.9/5
(40)

The majority of repetitive programming tasks are best done with _______________.

(Short Answer)
4.8/5
(36)

What is the second step that needs to be taken in order to apply a recursive approach?

(Multiple Choice)
5.0/5
(44)
Showing 1 - 20 of 35
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)