Recursion is a powerful programming technique. A function that calls itself recursively not only saves programming effort and avoids repetition but it can also be used to navigate complex structures such as Trees and Class Hierarchies. This book explains both the theory and the practice of recursion with numerous short programs written in C, Ruby and C#. However, you don’t need to program in those languages to follow this book. The techniques explained in The Little Book Of Recursion can be applied to any mainstream programming language.
This book explains …
- Recursive Functions
- The Call Stack
- Stack Frames
- Stack Corruption
- Recursion and Scope
- Fibonacci Recursion
- Infinite Recursion
- Navigating Tree Structures
- Disk Directory Recursion
- Examples in C, Ruby, C#
The Little Book Of Recursion guides you step-by-step towards a deep understanding of using recursive functions and techniques, no matter which programming language you are using. It is illustrated throughout. By the time you finish this book, you will understand how recursion works and how to use recursive functions efficiently and safely.
Table of Contents
Introduction
1 – Getting Started
2 – Functions
3 – Understanding Recursion
4 – The Call Stack
5 – Return Values
6 – Iteration and Recursion
7 – Problems and Side Effects
8 – Stack Corruption
9 – Tree Recursion
10 – Disk Recursion
Appendix