本文介绍了使用递归方法大O符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用递归的方法来找到大O以下递归函数:

  T(N)=(N-1)T(N-1)+(N-1)T(N-2)
 

解决方案

不管怎样,我试图解决采用了经典的递推关系法这种情况下。这是所有关于观察,如果模式存在:

非常昂贵的算法(计算机科学的敌人是生长因子和指数的订单)。

How to find the Big O for the following recursive function using the recursive method:

T(n)=(n-1)T(n-1)+(n-1)T(n-2)
解决方案

Anyway, I tried to solve this case using the classic recursive relation methodology.It's all about observing if a pattern exists:

Very expensive algorithm (Enemies of computer science are factorial and exponential orders of growth).

这篇关于使用递归方法大O符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-23 00:38
查看更多