AdrianBrewer6677 AdrianBrewer6677
  • 21-12-2020
  • Computers and Technology
contestada

In recursive methods, if a temporary variable is used to store intermediate results, how many copies of that variable will exist from the first call to the last one when the recursion finishes?

Respuesta :

doulatrajput786 doulatrajput786
  • 22-12-2020

Answer:

In recursive methods, if a temporary variable is used to store intermediate results, then number of copies it will make is equal to recursive calls made during recursions

Explanation:

If a temporary variable is used to store intermediate result than  it make a new copy every time when the recursive method calls itself until the last recursive call. So for that recursive methods are not storage efficient because they  push and pop results of each call on memory.

Answer Link

Otras preguntas

10. Why do people in deserts traditionally travel on backs of camels? (Write your answer in the box below.
Giardia does it lead to elevated levels of IgE and eosinophilia?
Who trained with Olympic archers for this film? * O Scarlett Johannson O Robert Downey, Jr. O Jeremy Renner Samuel L. Jackson
Write a program to input the day of a week and print holiday if it is Saturday
A certain species of fish require 1.5 cubic feet of water per fish to maintain a healthy environment. Find the maximum number of fish you could put in a tank me
2. Which of the following is a physical property?
In one Earth century (100 years), both Saturn and Earth will complete revolutions of the Sun. Which of the following correctly compares the number of revolution
40 inches to 4 feet as a fraction without units
Couplet Poem I need a couplet poem
6x+10=52 Solve for x.