Header Ads Widget

Ticker

6/recent/ticker-posts

Advantages and disadvantages of recursion.

 Recursive function are the function are the function which called itself . and this processor is known as recursion . Recursion follow some rule and regulation . There are some advantages and disadvantages of the recursion which are as follow..

Advantages of the recursion:-
                                              following are the advantages of using recursion process.
1. Recursive processor are easiest to write.
2. Recursive processor are easiest to understand .
3. It is easier to give recursive solution to real life complex problem rather iterative solutions are tougher or complex . for example:- Tower of hanoi , Tree Traversal etc.


Disadvantages of the recursion:-
                                                   Following are the disadvantages of the recursion over iteration.
1. Recursive procedures are relatively slower than it's equivalent iterative solution.
2. Recursive solutions are occupy more memory as compare to the equivalent iterative solution.

<<Pre--Rule of recursion                                        Array in c--Next>>



Recommended Post:-

Key points:-

Cracking the coding interview:-

 Array and string:-

Tree and graph:-

Hackerearth Problems:-

Hackerrank Problems:-

Data structure:-

 MCQs:-

Post a Comment

0 Comments