Data Structures & Algorithms · Core algorithms
Recursion
A function that calls itself on a smaller input. Learn the base case + recursive step recipe, how the call stack runs it, and when to use memoization.
Step 1 of 6 · Overview25 min read ·
Key idea
Prereqs: Functions & scope, Stacks. Next: Sorting & binary search (merge sort is recursive). MIT 6.100L Lecture 6 and 6.006.Next: 1. The recipe