What are the four questions that must be considered when constructing a recursive solution?
What will be an ideal response?
The four questions that must be considered when constructing a recursive solution are:
• How can you define the problem in terms of a smaller problem of the same type?
• How does each recursive call diminish the size of the problem?
• What instance of the problem can serve as the base case?
• As the problem size diminishes, will you reach this base case?
You might also like to view...
Which of the following does a binary tree have?
a) A root node b) Links that point back to its predecessor in the tree. c) Inaccessible nodes d) A leaf node or nodes e) Null pointers on the leaf links f) Exactly two links at each node.
You have decided that you will often need to create vertical guides. How do you create a vertical guide so you can include those steps on your cheat sheet?
a. Turn the Ruler on b. Drag then release the mouse button c. Drag right from the vertical ruler to create a guide d. Drag down from the topmost ruler to create a guide
Suppose class Child is derived from class Parent that was in turn derived from class GrandParent. The class child is a___________ of GrandParent
a) Successor b) Forebearer c) Ancestor d) Descendant e) Indirect descendant
Entering information into grouped worksheets is a very efficient way to modify a workbook
Indicate whether the statement is true or false