Workspace Recursion
0d
Problem-solving patterns

Recursive Reduction

Define a base case and reduce the measure on each call.

Recognition signal

A smaller input returns exactly the information needed by its caller.

Method

Record arguments on descent and compute completed values on return.

Worked example

factorial(3) waits for factorial(2), then multiplies its returned 2 by 3.

Common mistake

An input outside the supported domain may never reach the base case.