Part 5. Additional Design Techniques
Recursion is a powerful technique supported by modern programming languages. Well-designed recursive programs can be simpler and more elegantly designed than their iterative counterparts. But recursive thinking is required to know when to use recursion and how to do it appropriately. Recursion combined with backtracking can exploit a computer’s ability to try many solution paths rapidly and exhaustively. The example programs in chapter 15 introduce recursive thinking, and they demonstrate recursion and recursion with backtracking.
Multithreading is a technique that enables a program to run multiple execution paths simultaneously. Well-designed multithreaded programs can perform better than their single-threaded versions, especially on multicore machines. Chapter 16 briefly introduces the topic of multithreading through several classic example applications.