Exam 15: Recursion
Exam 1: Introduction to Computers and Java40 Questions
Exam 2: Java Fundamentals40 Questions
Exam 3: A First Look at Classes and Objects40 Questions
Exam 4: Decision Structures40 Questions
Exam 5: Loops and Files40 Questions
Exam 6: A Second Look at Classes and Objects40 Questions
Exam 7: Arrays and the ArrayList Class40 Questions
Exam 8: Text Processing and Wrapper Classes40 Questions
Exam 9: Inheritance40 Questions
Exam 10: Exceptions and Advanced File I/O40 Questions
Exam 11: GUI Applications–Part 140 Questions
Exam 12: GUI Applications–Part 240 Questions
Exam 13: Applets and More40 Questions
Exam 14: Creating GUI Applications with JavaFX40 Questions
Exam 15: Recursion20 Questions
Exam 16: Databases40 Questions
Select questions type
Which of the following problems can be solved recursively?
Free
(Multiple Choice)
4.8/5
(81)
Correct Answer:
D
This occurs when method A calls method B, which in turn calls method A.
Free
(Multiple Choice)
4.9/5
(63)
Correct Answer:
D
The Towers of Hanoi is a mathematical game that is often used in computer science textbooks to illustrate the power of recursion.
Free
(True/False)
4.7/5
(85)
Correct Answer:
True
A problem can be solved recursively if it can be broken down into successive smaller problems that are identical to the overall problem.
(True/False)
4.8/5
(88)
The actions performed by the JVM that take place with each method call are sometimes referred to as this.
(Multiple Choice)
4.9/5
(92)
Whereas a recursive algorithm might result in faster execution time, the programmer might be able to design an iterative algorithm faster.
(True/False)
4.7/5
(80)
Like a loop, a recursive method must have which of the following?
(Multiple Choice)
4.7/5
(87)
Any problem that can be solved recursively can also be solved iteratively, with a loop.
(True/False)
4.8/5
(84)
A method is called from the main method for the first time. It then calls itself seven times. What is the depth of recursion?
A) 1
B) 7
C) 8
D) 6
(Short Answer)
4.9/5
(76)
The recursive binary search algorithm is a good example of repeatedly breaking a problem down into smaller pieces until it is solved.
(True/False)
5.0/5
(79)
Without a base case, a recursive method will call itself only once and stop.
(True/False)
4.8/5
(79)
When recursive methods directly call themselves, it is known as this.
(Multiple Choice)
4.9/5
(65)
In the ________, we must always reduce the problem to a smaller version of the original problem.
(Multiple Choice)
4.9/5
(68)
Recursion can be a powerful tool for solving repetitive problems and is an important topic in upper-level computer science courses.
(True/False)
4.9/5
(82)
The ________ is at least one case in which a problem can be solved without recursion.
(Multiple Choice)
4.9/5
(79)
The recursive case does not require recursion, so it stops the chain of recursive calls.
(True/False)
4.8/5
(74)
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)