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

This data shows the number of sit-ups done by 27 students in a gym class. 58 62 49 52 75 86 88 54 56 61 85 48 77 60 47 58 62 73 78 69 65 84 59 67 53 84 50 Which
I can't seem to figure this out can someone explain this
Which of the following refers to the refusal to obey an unjust law? civil disobedience silent protest direct action
which statement about this triangle is true? tan 0= 4/5 sin 0 = 3/5 cos 0 = 3/5 sin 0 = 3/4
Why do plants need sunlight for photosynthesis?
SPANISH PLEASE HELP!!! I WILL GIVE BRAINLEST!!!!! Please answer all of them correctly
i want to the the key
Draw a chain of command for one of the following: (PLEASE FAST) - School - A club or organisation you are involved with (sports teams\music)
NaCl +H₂SO4=HCl +NaHSO4 Balance this equation
628 times 12[tex]628 \times 12[/tex]​