Algorithms | Analysis of Algorithms (Recurrences) | Question 9

Last Updated :
Discuss
Comments
The time complexity of the following C function is (assume n > 0 (GATE CS 2004) c
int recursive (mt n)
{
   if (n == 1)
     return (1);
   else
     return (recursive (n-1) + recursive (n-1));
}
0(n)
0(nlogn)
0(n^2)
0(2^n)
Share your thoughts in the comments