Any recursive definition must have a non-recursive part, called the ___________, which
permits the recursion to eventually end.
D. first case
Recursion is a programming technique in which a ________ calls itself.
D. parameter
____________ problems and formulas are often expressed recursively.
A. Business
B. Programmatic
Each recursive call to a method creates new __________ and __________.
A. Local variables
A careful _______ of recursive processing can provide insight into the way it is used to
solve a problem.
D. use
Recursion is the most elegant and appropriate way to solve ________ problems, but for
others it is less intuitive than an iterative solution.
D. none of the above
The order of a recursive algorithm can be determined using techniques similar to
analyzing ______ processing.
A. programmatic
The Towers of Hanoi solution has ___________ complexity, which is very inefficient.
Yet the implementation of the solution is incredibly short and elegant.
A. quadratic
Any recursive definition must have a __<nonrecursive>__ part, called the base case,
which permits the recursion to eventually end.
Each recursive call to a method creates __<new>__ local variables and parameters.
The order of a recursive algorithm can be determined using techniques similar to
If method m1 invokes m2 which invokes m3 which invokes m1 again, then this is an
A recursive definition without a base-case will lead to __<infinite recursion>__.
True/False. Recursion is a programming technique in which a method calls itself.
True/False. Any recursive definition must have a nonrecursive part, called the base
case, which permits the recursion to eventually end.
True/False. Each recursive call to a method uses the same local variables and
parameters.
used to solve a problem.
True/False. Recursion is the most elegant and appropriate way to solve some
problems, but for others it is less intuitive than an iterative solution.
similar to analyzing iterative processing.
True/False. The Towers of Hanoi solution has quadratic complexity, which is very
inefficient. Yet the implementation of the solution is incredibly short and elegant.
True/False. Some problems can only be solved recursively.
new set of local variables and parameters with each call.
What is the output of the following program?
//********************************************************************
// recurse.java Author: Chase
//
// Demonstrates recursion.
//********************************************************************
public class recurse2
public static void recurse(int x)
{
if (x<=1)
System.out.print(“***”);
else if ((x % 2) == 0)
What is recursion?
What is infinite recursion?
When is a base case needed for recursive processing?
Is recursion necessary?
When should recursion be avoided?
What is indirect recursion?
Explain the general approach to solving the Towers of Hanoi puzzle. How does it
relate to recursion?