Lab 12: Recursion
Summary
As usual, we'll work on this week's B notebook today.
Table of Contents
- Lab 12 Home
- Part 1: Exercises (start with B notebook)
- Reference: Case-by-case recursion strategy
- Reference: Recursive design patterns
- Knowledge Check
Big Questions
- How has your understanding of loops and repetitive actions changed since you started this class?
Show "Answer"
There's no right answer here, but we hope that you feel you have a more refined and explicit understanding of how repetitive processes start and stop, and what kinds of patterns they might exhibit. It may not be obvious (which is why we're asking this question), but by thinking a lot about loops, and where they should start and stop, what should happen in each iteration, etc., you are developing a new way to think about certain problems. And we're about to do that again with recursion. - What is "wishful thinking?"
Show Answer
Wishful thinking is when you assume that you have already solved a problem before starting to solve it. It's a process of willing suspension of disbelief, just like when you get absorbed in a good story and are willing to excuse inaccuracies or exaggerations for the sake of the plot (except maybe a little less entertaining and a little more deliberate). If used carefully and with precision, it can be helpful in solving recursive problems.