Exam 13: Recursion
Exam 1: Introduction to Programming and the Java Language47 Questions
Exam 2: Programming Building Blocks- Java Basics57 Questions
Exam 3: Object-Oriented Programming, Part 1: Using Classes62 Questions
Exam 4: Introduction to Graphical Applications57 Questions
Exam 5: Flow of Control, Part 1: Selection68 Questions
Exam 6: Flow of Control, Part 2: Looping67 Questions
Exam 7: Object-Oriented Programming, Part 2: User-Defined Classes78 Questions
Exam 8: Single-Dimensional Arrays63 Questions
Exam 9: Multidimensional Arrays and the Arraylist Class62 Questions
Exam 10: Object-Oriented Programming, Part 3: Inheritance, Polymorphism, and Interfaces61 Questions
Exam 11: Exceptions, and Input Output Operations77 Questions
Exam 12: Graphical User Interfaces Using Java FX89 Questions
Exam 13: Recursion59 Questions
Exam 14: An Introduction to Data Structures69 Questions
Exam 15: Running Time Analysis56 Questions
Exam 16: RGB Colors, Decimal Conversion, Java Naming, and Random Number Generation110 Questions
Select questions type
The idea of __________ is to reduce the size of a problem at each step so that we eventually arrive at a very small, easy-to-solve problem.
(Multiple Choice)
4.8/5
(41)
What would be a good first base case if you were determining whether a String is a palindrome?
(Multiple Choice)
4.8/5
(32)
With a tail recursive method, the ___________ stays the same.
(Multiple Choice)
5.0/5
(39)
The efficiency of the method at execution time is called the:
(Multiple Choice)
5.0/5
(35)
Which code would you use to trace recursive calls, where the desired expression goes inside the parentheses?
(Multiple Choice)
4.9/5
(38)
Identify the two things you must define in order to construct a recursive solution to a problem.
(Essay)
5.0/5
(41)
Evaluate why a recursion method is useful for calculating the greatest common divisor.
(Essay)
4.7/5
(40)
A recursive function is implemented using decision constructs, while an iterative function is implemented with looping constructs.
(True/False)
4.8/5
(28)
Each execution of the recursive method must wait to return its value until its recursive call to the method returns a value.
(True/False)
4.8/5
(41)
Usually, not coding the base case will result in a runtime exception caused by the infinite number of recursive calls.
(True/False)
4.9/5
(38)
In solving the Towers of Hanoi problem, when the if statement identifies the base case, it allows the program to keep moving disks until there are no more disks to move.
(True/False)
4.8/5
(37)
List three features that make using an iteration preferable to a recursion in printing "Happy Birthday" 10 times.
(Essay)
4.8/5
(40)
When the recursive calls all the way to the base case and the return value stays the same throughout the process, the method is called:
(Multiple Choice)
4.8/5
(34)
Which of the following are reasons to choose recursion over iteration?
(Multiple Choice)
4.9/5
(33)
If there are two recursive terms on the right side of the formula, there will be one base case.
(True/False)
4.8/5
(46)
Showing 21 - 40 of 59
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)