Question: When should you use recursion ( instead of iteration ) ? Only after a standardized timing test has been executed and the results favor a

When should you use recursion (instead of iteration)?
Only after a standardized timing test has been executed and the results favor a recursive solution
Only when it's one of the following problems (or a problem that can be mapped to one of these problems):
Factorial
GCD
Fibonacci Numbers
Binary Search
Towers of Hanoi
There's a straight forward recursive solution //(or it's the only solution)
When should you use recursion ( instead of

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!