下面程序段的时间复杂度为多少 。fact(int i){ if (n <= 1) return(1);else return (n*fact(n-1));}()

A.O(1) B.O(n) C.O(n^2) D.以上都不对

时间:2024-03-12 16:51:46

相似题目