Q. Differentiate between iteration and recursion.
Answer =
On the other hand, in recursion, since it involves function call at each step, fresh memory is allocated for each recursive call. For this reason, i.e., because of function call overheads, the recursive function runs slower than its iterative counterpart.
Post a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )