Tricks of the trade: Recursion to Iteration, Part 1: The Simple Method, secret features, and accumulators

from blog Tom Moertel's Blog, | ↗ original
By Tom Moertel Posted on May 11, 2013 Tags: programming, recursion, iteration, python, google code jam, puzzles, recursion-to-iteration series Alternative title: I wish Python had tail-call elimination. Recursive programming is powerful because it maps so easily to proof by induction, making it easy to design algorithms and prove them correct....