Filters
Question type

Study Flashcards

Recursive function calls are _______________ efficient than loops.

Correct Answer

verifed

verified

less

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


A) Identify at least one case in which the problem can be solved without recursion.
B) Determine a way to solve the problem in all other circumstances using recursion.
C) Identify a way to stop the recursion.
D) Determine a way to return to the main function.

E) A) and B)
F) C) and D)

Correct Answer

verifed

verified

The process of calling a function requires _____.


A) a long memory access
B) a quick memory access
C) several actions to be performed by the computer
D) one action to be performed by the computer

E) A) and D)
F) B) and C)

Correct Answer

verifed

verified

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

A) True
B) False

Correct Answer

verifed

verified

Recursive algorithms are more concise and efficient than iterative algorithms.

A) True
B) False

Correct Answer

verifed

verified

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


A) smaller
B) one-line
C) manageable
D) modular

E) A) and C)
F) A) and B)

Correct Answer

verifed

verified

A

Recursion is required to solve some type of problems.

A) True
B) False

Correct Answer

verifed

verified

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


A) function calls
B) conditional clauses
C) overhead actions
D) object instances

E) A) and B)
F) None of the above

Correct Answer

verifed

verified

Some problems are _______________ solved with recursion than with a loop.

Correct Answer

verifed

verified

A base case is not necessary for all recursive algorithms.

A) True
B) False

Correct Answer

verifed

verified

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

Correct Answer

verifed

verified

There can be several functions involved in the recursion.

A) True
B) False

Correct Answer

verifed

verified

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


A) Identify at least one case in which the problem can be solved without recursion.
B) Determine a way to use recursion in order to solve the problem in all circumstances which cannot be solved without recursion.
C) Identify a way to stop the recursion.
D) Determine a way to return to the main function.

E) None of the above
F) A) and C)

Correct Answer

verifed

verified

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

Correct Answer

verifed

verified

The base case is a case in which the problem can be solved without _____.


A) loops
B) if
C) objects
D) recursion

E) None of the above
F) C) and D)

Correct Answer

verifed

verified

A solution using a(n) _______________ is usually more evident than a recursive solution.

Correct Answer

verifed

verified

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

A) True
B) False

Correct Answer

verifed

verified

A problem can be solved with recursion if it can be broken into smaller problems that are identical in structure to the overall problem.

A) True
B) False

Correct Answer

verifed

verified

True

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.

A) True
B) False

Correct Answer

verifed

verified

Recursive functions are _____ iterative algorithms.


A) more efficient than
B) less efficient than
C) as efficient as
D) incomparable to

E) All of the above
F) A) and C)

Correct Answer

verifed

verified

Showing 1 - 20 of 35

Related Exams

Show Answer