SHARE
SPREAD
HELP

The Tradition of Sharing

Help your friends and juniors by posting answers to the questions that you know. Also post questions that are not available.


To start with, Sr2Jr’s first step is to reduce the expenses related to education. To achieve this goal Sr2Jr organized the textbook’s question and answers. Sr2Jr is community based and need your support to fill the question and answers. The question and answers posted will be available free of cost to all.

 

#
Authors:
Tony Gaddis
Chapter:
Recursion
Exercise:
Multiple Choice
Question:9 | ISBN:9780132576376 | Edition: 2

Question

A recursive algorithm must _______________ in the recursive case.
a. solve the problem without recursion
b. reduce the problem to a smaller version of the original problem
c. acknowledge that an error has occurred and abort the program
d. enlarge the problem to a larger version of the original problem

TextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbook

Answer

The correct answer is b) reduce the problem to a smaller version of the original problem.

 

Explanation for the correct answer:

  • The recursive case  in the problem is solved using recursion approach of the algorithm. 
  • That means, it is used to reduce the problem to a smaller version of the original problem.

 

So, a recursive algorithm must  b. reduce the problem to a smaller version of the original problem in the recursive case.

 

0 0

Discussions

Post the discussion to improve the above solution.