And I'm going to show you an example in a 1 second, just to drive this home, but notice the characteristics. In the first two cases, the problem reduced by 1 at each step.
在前面两个例子里,每一部问题的规模缩小了,不管是迭代的还是递归的,这表明这个问题的复杂性可能是线性的。
麻省理工公开课 - 计算机科学及编程导论课程节选
应用推荐
模块上移
模块下移
不移动