In this chapter, you explore some more advanced aspects around recursion. You start with the optimization technique called memoization. After that, you look at backtracking as a problem-solving strategy that relies on trial and error and tries out possible solutions. Although this is not optimal in terms of performance, it can keep various implementations comprehensible.
8.1 Memoization
In Chapter 3, you learned that recursion is feasible for describing many algorithms and calculations in an understandable and, at the same time, elegant ...