Alex Rivera | Logout

What are the advantages and disadvantages of recursion?

Asked 2011-03-09T18:55:35.133
38

With respect to using recursion over non-recursive methods in sorting algorithms or, for that matter, any algorithm what are its pros and cons?

Edit
Report

1 Answer

4

I personally prefer using Iterative over recursive function. Especially if you function has complex/heavy logic and number of iterations are large. This because with every recursive call call stack increases. It could potentially crash the stack if you operations are too large and also slow up process.

answered 2011-03-09T19:01:27.360

Your Answer