What's the point of this? Again, now that I can think about things recursively, I can similarly break things down into simpler versions of the same problem. It could be one version.
这些的意思是什么呢?再一次我想说,我既然能够以递归的方式思考了,那么我就可以简单地把问题,转化为更简单的同类问题。
But I want to stress again, as long as I do the base case right and my inductive or recursive step reduces it to a smaller version of the same problem, the code will in fact converge and give me out an answer.
就开心的去做吧,但是我想再次强调,只要基础事件处理正确而我的递归,或递推步骤能把它简化为更简单的同类问题,那么这段代码就可以收敛。
And the idea behind recursion I'm going to describe with a simple example. And then I'm going to show you how we can actually use it.
但是为了解释递归的意义,我想举个简单的例子,我将会给你们展示我们该如何使用它。
There are other problems that are much more naturally thought of in a recursive fashion.
有一些问题不递归,也可以很简单的解决。
fib Roughly speaking, the analysis of fib is actually quite complex, of a recursive fib.
简单的说,递归的fib的分析实际上非常复杂。
应用推荐