3 ms·
> Basicly, all recursion can be replaced by a loop that does not risk blowing the stack or using extra memory. This isn't true at all. You can replace all rec
by theseoafs 12y ago
> Basicly, all recursion can be replaced by a loop that does not risk blowing the stack or using extra memory.
This isn't true at all. You can replace all recursion with loops, sure, but you're going to have to simulate a stack (i.e. use extra memory) to convert complex recursive functions to loops.