flâneur — a map of the web's best reading

Reading 14: Recursion

web.mit.edu · 5,285 words · saved by 1 readers

In today’s class, we’re going to talk about how to implement a function, once you already have a specification. We’ll focus on one particular technique, recursion. Recursion is not appropriate for every problem, but it’s an important tool in your software development toolbox, and one that many people scratch their heads over. We want you to be comfortable and competent with recursion, because you will encounter it over and over. (That’s a joke, but it’s also true.)

Reading 14: Recursion Reading 14: Recursion Software in 6.031 Safe from bugs Easy to understand Ready for change Correct today and correct in the unknown future. Communicating clearly with future programmers, including future you. Designed to accommodate change without rewriting. Objectives After today’s class, you should: be able to decompose a recursive problem into recursive steps and base cases know when and how to use helper functions in recursion understand the advantages and disadvantages of recursion vs. iteration Recursion In today’s class, we’re going to talk about how to implement a

Explore this link on the map →

related reading