Recursion and Iteration | Course Readings | 6.101 Fall 2023
This reading is relatively new, and your feedback will help us improve it! If you notice mistakes (big or small), if you have questions, if anything is unclear, if there are things not covered here that you'd like to see covered, or if you have any other suggestions; please get in touch during office hours or open lab hours, or via e-mail at 6.101-help@mit.edu. This reading examines recursion more closely by comparing and contrasting it with iteration. Both approaches create repeated patterns of computation. Recursion produces repeated computation by calling the same function recursively, on a simpler or smaller subproblem. Iteration produces repeated computation using for loops or while loops. If we can come up with an iterative version, do we need recursion at all? In one sense, no, we don't need recursion -- any function we can write recursively could also be written iteratively. But, some problems lend themselves naturally to a recursive solution. When we try to solve those kinds o
Recursion and Iteration | Course Readings | 6.101 Fall 2023 Recursion and Iteration this page (from a previous semester) is no longer accessible, except for staff
Explore this link on the map →related reading
- Recursion | Course Readings | 6.101 Fall 2023py.mit.edu
- Functions | Course Readings | 6.101 Fall 2023py.mit.edu
- Functional Programming | Course Readings | 6.101 Fall 2023py.mit.edu
- Graph Search | Course Readings | 6.101 Fall 2023py.mit.edu
- Inheritance and Object-oriented Design | Course Readings | 6.101 Fall 2023py.mit.edu
- Environment Model | Course Readings | 6.101 Fall 2023py.mit.edu
- Recipes | 6.101 Fall 2022py.mit.edu
- How to Read a Paperweb.stanford.edu
- General Information & FAQweb.mit.edu
- How Not to Teach Recursionparentheticallyspeaking.org
- Custom Types and the Environment Model | Course Readings | 6.101 Fall 2023py.mit.edu
- Rust Iterator Cheat Sheetdanielkeep.github.io