All problems that are solvable with recursion are solvable with loop, and vice versa.
Is this statement right or proven at all? sometimes, using recursion causes stack overflow. if the statement is correct. we'd better use loop instead.
thanks
Yes. Loop + Stack will solve all recursion problems.
After all, compiler does that internally. Recursion is nothing but pushing data onto a stack, and later popping from it, done by the compiler.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With