递归
来源:互联网 发布:linux系统解压tar.gz 编辑:程序博客网 时间:2024/06/10 05:23
递归
应看到每个步骤的相同点
结束点
特征Characteristics of Recursive Methods
The key features common to all recursive routines:
• It calls itself.
• When it calls itself, it does so to solve a smaller problem.
• There’s some version of the problem that is simple enough that the routine can solve it, and return, without calling itself.
The Towers of Hanoi
0 0