In lecture today, the following topics were covered:
- more examples of simple recursion (sum of 1..n, findInArray, fibonacci)
- ways of looking at arrays recursively (splitting into head, tail; front,back)
- the possibility for >1 base case and/or >1 recursive call
- three steps to verify a recursive solution
- a continued debate over recursion’s simplicity in writing/reading vs it’s efficiency in solution
Here’s Homework 1, due at the start of class on Wednesday of next week (10/7/2009): Homework 1 (PDF)
Recursion is Chapter 13 of the book.