Converting Recursion to Iteration
A step-by-step look at replacing recursion with accumulators or explicit stacks in several representative algorithms.
3 posts, newest first.
A step-by-step look at replacing recursion with accumulators or explicit stacks in several representative algorithms.
Python implementations and study notes for common sorting, searching, linked-list, string, and combinatorial algorithms.
Solutions to two classic interview exercises: transforming random-number ranges and applying Newton's method.