单选题 求整数n(n≥0)阶乘的算法如下,其时间复杂度是( )。【2012年全国试题1(2分)】int fact(int n){if(n<=i) return i;return n*fact(n一1);
【正确答案】 B
【答案解析】