下面算法的时间复杂度为()。 int f(unsigned int n) if
题型:单项选择题
问题:
下面算法的时间复杂度为()。
int f(unsigned int n)
if(n=0||n==1)return 1;
else return n*f(n-1);
A.O(1)
B.O(n)
C.O(n2)
D.O(n!)
下面算法的时间复杂度为()。
int f(unsigned int n)
if(n=0||n==1)return 1;
else return n*f(n-1);
A.O(1)
B.O(n)
C.O(n2)
D.O(n!)