Chapter 14: Recursion

Chapter Goals

Triangle Numbers

Triangle Numbers (triangle.cpp)

Permutations

Permutations (permute.cpp)

Thinking Recursively

Thinking Recursively (palindrome.cpp)

Recursive Helper Functions

Mutual Recursion

Mutual Recursion

Mutual Recursion

Mutual Recursion (eval.cpp)

The Efficiency of Recursion