ICSI 213: chapter 16 - recursion

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

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


Ensembles d'études connexes

Thyroid Endocrinology: Anatomy, production of T3 & T4, function of thyroid & thyroxine

View Set

statistics in business/econ-Hypothesis tests about the mean or proportion of a single population-ch 9.3, 9.5, 9.6, 10.1

View Set

Ch 9: Disability Income and Related Insurance

View Set

Nursing Concepts Caring Interventions Part 4

View Set

Calculating and Reporting Healthcare Statistics Ch 1 questions

View Set

SNCO DLC - Leadership and Management

View Set

Chapter 8: Body Mechanics and Patient Mobility

View Set

Nutrition Chapter 9: Plant-Based Diets

View Set