All problems solvable with recursion are solvable using a loop, and vice versa.
Is this statement true or proven at all? Sometimes using recursion causes a stack overflow. if the statement is true. we would rather use a loop.
thanks
Yes. Loop + Stack will solve all recursion problems.
In the end, the compiler does this internally. Recursion is nothing more than pushing data onto the stack and the subsequent statement from it, performed by the compiler.
As a rule, the corresponding iterative (cyclic) solution will require the same amount of memory, but it will need to be managed explicitly.