What is the advantage and disadvantage of using recursion Br
What is the advantage and disadvantage of using recursion? Briefly explain what is infinite recursion, and what causes it to happen?
Solution
Answer:
Adventages: By using recursion , it reduces the time complexity of the program . It makes the program to look easier and to prove.
Disadventages : Recursion is very slow and takes more space as well . Handling stack is a complex thing and thus makes it very complex.
6. Infinite recursion as the name suggests is any recursion which falls in infinite loop. That means this type of recursion will never ends.
It happens when recursive functions fails to stop recursing.
