单项选择题

下面算法的时间复杂度为____________。‍
int  f( unsigned  int  n ) {‍
if ( n==0 || n==1 ) return  1;   else  return  n*f(n-1);‍
        }‍
A.O(1)
B.O(n2)
C.O(n)
D.O(n!)

热门 试题