单项选择题
求整数n(n>=0)阶乘的算法如下,其时间复杂度是()。
int fact(int n)
{
if(n<=1)
return 1
return n*fact(n-1)
}
A、O(n
)
B、O(n)
C、O(
)
D、O(
)
点击查看答案
