Exam 12: Recursion

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

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

(Short Answer)
4.9/5
(78)

What is referred to as the base case?

(Multiple Choice)
4.7/5
(83)

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

(True/False)
4.9/5
(73)

Function A calls function B, which calls function C, which calls function A. This is called _____ recursion.

(Multiple Choice)
4.7/5
(76)

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

(Short Answer)
4.8/5
(72)

Recursion is _____.

(Multiple Choice)
4.8/5
(84)

What defines the depth of recursion?

(Multiple Choice)
4.8/5
(83)

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

(Multiple Choice)
4.8/5
(63)

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

(True/False)
4.8/5
(78)

What is referred to as the recursive case?

(Multiple Choice)
4.7/5
(74)

The base case does not require _______________, so it stops the chain of recursive calls.

(Short Answer)
5.0/5
(74)

All the cases of the recursive solution other than the base case are called the _______________ case.

(Short Answer)
4.8/5
(76)

If the problem can be solved immediately without recursion, then the recursive function _____.

(Multiple Choice)
4.9/5
(77)

A recursion in which a function directly calls itself is known as _______________ recursion.

(Short Answer)
4.8/5
(79)

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.9/5
(81)
Showing 21 - 35 of 35
close modal

Filters

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