Just because an algorithm is implemented with recursion does not mean your language of choice needs to support recursion. You can use an explicit stack to simulate the effects of recursion. Additionally, in algorithms that use "tail recursion" (calling the recursive procedure at the end of the procedure code itself) it could/should be rewritten as a loop, because nothing can happen until you reach the base case, and the stack of function calls unwinds. The only reason you see tail recursion is because it is simple to write.Originally Posted by yvan