The Line on Recursion
Recall the two parts of a recursive solution:
- 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.
In terms of the "divide a line into 16 pieces" problem these are:
- If a line is small enough, don't divide it.
- Divide the line into two pieces.
- Apply this process to each of the two pieces.