adplus-dvertising
frame-decoration

Question

Recursion is memory-intensive because:

a.

Recursive functions tend to declare many local variables

b.

Previous function calls are still open when the function calls itself and the activation records of these previous calls still occupy space on the call stack

c.

Many copies of the function code are created

d.

It requires large data values

Answer: (b).Previous function calls are still open when the function calls itself and the activation records of these previous calls still occupy space on the call stack

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Recursion is memory-intensive because:

Similar Questions

Discover Related MCQs

Q. Part of a recursive algorithm that handles a simple input that can be solved without resorting to a recursive call, is known as

Q. A recursive agorithm must have

Q. If an algorithm calls itself to do some part of work, it is said to be

Q. For which of the following cases will the reversal of a string be equal to the original string?

Q. Recursion is a method in which the solution of a problem depends on ____________

Q. Which of the following problems can be solved using recursion?

Q. Recursion is similar to which of the following?

Q. In recursion, the condition for which the function will stop calling itself is ____________

Q. Which of the following statements is true ?

Q. Which of the following methods can be used to find the factorial of a number?

Q. Which of the following recursive formula can be used to find the factorial of a number?

Q. What is the time complexity of the above recursive implementation to find the factorial of a number?

Q. What is the space complexity of the above recursive implementation to find the factorial of a number?

Q. Suppose the first fibonnaci number is 0 and the second is 1. What is the sixth fibonnaci number?

Q. Which of the following is not a fibonnaci number?

Q. Which of the following methods can be used to find the nth fibonnaci number?

Q. Which of the following recurrence relations can be used to find the nth fibonacci number?

Q. What is the time complexity of the above recursive implementation to find the nth fibonacci number?

Q. What is the space complexity of the above recursive implementation to find the nth fibonacci number?

Q. Which of the following methods can be used to find the sum of first n natural numbers?