Q. If any recursive function can be easily written using iterative code, then what is the need for recursion? When would you prefer recursion over iteration and vice versa?
Answer =
Recursion makes the program sorter and simple.
Recursion preferred over iteration when we have to understand program easily and to make program sorter.
Iteration preferred over recursion when we have required less memory space.
Plz answer this question as it is complicated one!!
ReplyDeletePlease check again....
DeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )