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
related reading
- Recursion | Course Readings | 6.101 Fall 2023py.mit.edu
- Reading 14: Recursionweb.mit.edu
- How Not to Teach Recursionparentheticallyspeaking.org
- Reading 11: Recursive Data Typesweb.mit.edu
- CSC 151 - Recursion Over Listseikmeier.sites.grinnell.edu
- CSC 151 - Recursion over Numberseikmeier.sites.grinnell.edu
- The Recurse Center User’s Manual - Recurse Centerrecurse.com
- Functions | Course Readings | 6.101 Fall 2023py.mit.edu
- Rust Iterator Cheat Sheetdanielkeep.github.io
- CSC 151 - Tail Recursioneikmeier.sites.grinnell.edu
- CSC 151 - Analyzing procedureseikmeier.sites.grinnell.edu
- The Difference between Recursion & Induction : ezyang's blogblog.ezyang.com