Recursion Fundamentals
Define a smaller instance, a base case, and the result promised by each call. Use a decreasing measure to establish termination and distinguish returned values from shared mutable state. Trace stack frames, return values, and work before and after recursive calls.