Which of these statements is true?(Any one)
1) Recursion can solve a few problems which Iteration cannot.
2) Iteration can solve a few problems which Recursion cannot.
3) Anything that Recursion can solve can be solved by Iteration.
4) Recursion and Iteration are totally unrelated.
Samrat recursion nd iteration solves problem with different approach... asaik , one can use either of them... Recursion makes code smaller but stack overhead is included where as iteration makes code fatser
only 1. Iteration can be implemented through the recursion without any other data structures.
Recursive function could call itself multiple times during the execution (tower of Hanoi as an example). It requires stack data structure to implement recursion through iteration.