A good answer might be:
You stop applying the hammer when each sub-problem (rock) is small enough.
Recursion on the Rocks
Here (again) are the two parts to recursion:
- If the problem is easy, solve it immediately.
- If the problem can't be solved immediately,
divide it into smaller problems, then:
- Solve the smaller problems by applying this procedure to each of them.
Here are how this applies to the rock-destruction problem:
- When a piece is small, don't pound it any further.
- To destroy a large rock, hit it with a hammer.
The rock shatters, leaving small and large pieces.
- Apply this procedure to each of the pieces.
Say that you wish to divide a line into 16 equal pieces.
What is the first thing that you do?