递归调用是一种特殊的嵌套调用,是某个函数调用自己或者是调用其他函数后再次调用自己的,只要函数之间互相调用能产生循环的则一定是递归调用,递归调用一种解决方案,一种是逻辑思想,将一个大工作分为逐渐减小的小工作,比如说一个和尚要搬50块石头,他想,只要先搬走49块,那剩下的一块就能搬完了,然后考虑那49块,只要先搬走48块,那剩下的一块就能搬完了,递归是一种思想,只不过在程序中,就是依靠函数嵌套这个特性来实现了。
我们知道在很多情况下会产生recursive calls(递归调用),比如做一些操作的分配空间,执行ddl,或者触发trigger,或者在解析的时候数据字典缓存需要一些对象的信息。
基于158个网页-相关网页
... 递归调用 recursive invocation 递归调用的栈结构 stack structure for recursive call 递归定义操作系统 recursive-defined operating system ...
基于20个网页-相关网页
... .C,.Fortran:调用C或者Fortran子程序的动态链接库。 Recall:递归调用 browser,debug,trace,traceback:程序调试 ...
基于1个网页-相关网页
5次递归调用,才得到这个答案。
添加一个可到达的退出分支以停止递归调用。
Add a reachable exit branch to stop the recursive invocation.
这一优化将递归调用转换成本地回路,这样可以防止栈溢出。
This optimization transforms recursive calls into local loops, in order to prevent stack overflows.
We saw some quadratic algorithms, typically those are things with multiple nested loops, or iterative or recursive calls, where you're doing, say, a linear amount of time but you're doing it a linear number of times and so it becomes quadratic, and you'll see other polynomial kinds of algorithms.
我们看过一些平方算法,他们一般进行了多次嵌套循环,或者递归迭代调用,对一个线性操作调用线性次,这样就变成平方次了,以后你们能看到,一些多项式算法。
All right, any questions about that. Yeah?
递归调用来解决其他问题?
Because the algorithm I proposed is going to leverage this idea of recursion which recall was just a piece of jargon we tossed out at the last-- at the end of last week's lecture, last time's lecture recursion really in this context refers to the act of a function calling it's self.
因为我提出的这种算法使用了,递归的思想,这是上周课程的最后,所提出的一个术语,上次的课程中,递归是指,函数的自我调用。
应用推荐