ICSI 213: chapter 16 - recursion
This type of method is a method that calls itself
recursive
To solve a program recursively, you need to identify at least one case in which the problem can be solved without recursion - this is known as
the base case
A problem can be solved recursively if it can be broken down into successive smaller problems that are unique within the overall problem
FALSE
The number of times that a method calls itself is known as the
depth of recursion
The actions that the Java Virtual Machine must perform any time a method is called is called
overhead
The part of a problem that is solved with recursion is known as the
recursive case
Like a loop, a recursive method must have
some way to control the number of times it repeats itself
The depth of recursion is
the number of times that a method calls itself
A problem can be solved recursively if it can be broken down into successive smaller problems that are identical to the overall problem.
TRUE
Any problem that can be solved recursively can also be solved iteratively.
TRUE
If Method A calls Method B which in turn calls Method A, it is called indirect recursion
TRUE
Indirect recursion occurs when a method calls another method that in turn calls the first method.
TRUE
Recursive algorithms are usually less efficient than iterative algorithms
TRUE
Like _________, a recursive method must have some way to control the number of times it repeats
a loop
The Towers of Hanoi is
a mathematical game, often used in computer science textbooks, and demonstrates the power of recursion
A recursive method is a method that
calls itself