next next up down toc toc mail

8.6.  Working out recursive solutions

To solve such problems ask yourself: "If I had solved the n-1 case could I solve the n case?" If the answer to this question is positive you proceed under the outrageous assumption that the n-1 case has been solved. Oddly enough this often works, so long as there is some base case (often when n is zero or one) which can be treated as a special case.


back next up down toc toc mail


Created by unroff & hp-tools. © by Hans-Peter Bischof. All Rights Reserved (1998).

Last modified: 27/July/98 (12:14)