.. recur documentation master file, created by sphinx-quickstart on Fri Oct 4 11:53:27 2019. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. Understanding Recursion Using Python ==================================== **A shamelessly verbose guide to the wonders of recursion** Getting Started ^^^^^^^^^^^^^^^ For a lot of people, learning recursion for the first time pretty much sucks. It doesn't have to be that way. This guide is intended to help beginning (and perhaps even intermediate) programmers learn to think recursively. It's not math-heavy, so there are no proofs, and very little discussion of time/space complexity. But I do take a text-heavy approach, because I think patient explanation is a key ingredient in helping people understand this crucial technique. Although the code is presented in Python, recursion is a fairly universal concept, so the material should be accessible to non-Python developers. Sometimes I'll present the code immediately and then unpack it. Other times, we'll work towards the final recursive solution, starting only from first principles. At the end of each section I deduce a few heuristics, and include an exercise or two that will apply the material and push comprehension a bit further. I hope the end result is a critical framework developers can use to identify, analyze and solve problems that demand (or simply favor) recursive solutions. .. toctree:: :maxdepth: 2 :caption: Contents: 01 Introduction 02 Scope, Frame and Stack 03 Frames 04 Counting 05 Swapped 06 Palindromes 07 Lists of Lists 08 Power Set 09 Pascal 10 Fibonacci 1 11 Fibonacci 2 12 Search and Sort 13 Koch Curves 14 Sierpinski 15 L-System 16 L-System Solution 17 Hanoi Indices and tables ^^^^^^^^^^^^^^^^^^ * :ref:`genindex` * :ref:`modindex` * :ref:`search`