which function cannot use recursion
Answers
Answered by
0
Explanation:
So, no, there is nothing that can be done with recursion and that cannot be done with a loop and a stack. Any recursive function can be made to iterate (into a loop) but you need to use a stack yourself to keep the state. Other kinds of recursion that can be translated into tail recursion are also easy to change
Answered by
1
Explanation:
There is nothing recursion can compute that looping can't, but looping takes a lot more plumbing. Therefore, the one thing recursion can do that loops can't is make some tasks super easy.
Similar questions