|
| |
Recursion
Some procedures invoke themselves.
How many steps to the top of the mountain?
- "if you are at the top,
- the distance is zero;
- else
- take one step towards it;
- the answer is now one plus how
many steps it takes from there"
some examples: how far to the wall?
exploring the maze
how does it work?
trade-offs
|