64.7k views
3 votes
In some cases a recursive solution to a given problem is more intuitive and easier to implement than an iterative solution. However, recursive solutions are usually more expensive than iterative solutions in terms of:__________.

a. Running-time growth rate
b. The statement is false. Recursive solutions have similar efficiency to iterative solutions solving the same problem
c. Both running-time growth rate and storage space
d. Storage space

User JoshDavies
by
5.2k points

1 Answer

7 votes

Answer:

The correct answer is d)Storage Space

Step-by-step explanation:

a. Running-time growth rate : Recursive Algorithm are more efficient than iterative algorithms in terms of Running-time growth rate

b. The statement is false. Recursive solutions have similar efficiency to iterative solutions solving the same problem : In some problems recursive algorithms are less efficient than iterative algorithms.

c. Both running-time growth rate and storage space : Recursive algorithms are only less efficient in storage in some special cases not commonly.

d. Storage space: The recursive function has a problem, resources! It spend a lot of resources of machine, because need to push and pop variables, that uses lot of memory.

User Slfan
by
4.2k points