1.

What is the time complexity for the following C module? Assume that n > 0;int module(int n){if(n == 1)return 1;elsereturn (n + module(n-1));}

A. O(n)
B. O(log n)
C. O(n2)
D. O(n!)
Answer» B. O(log n)


Discussion

No Comment Found