Which data structure can be used to "eliminate" recursion from a recursive program? Array, stack, queue, or list? How is it used to that end?
When I eliminate recursion from the program computing factorial $n! = n(n-1)!$, I replace recursion with a loop. But I don't see how to do a similar transformation in general.