The time complexity of the following C function is (assume n > 0)
int recursive (int n) {
if (n == 1)
return (1);
else
return (recursive (n - 1) + recursive (n - 1));
}
(A) O(n)
(B) O(n log n)
(C) O(n2)
(D) O(2n)
Answer: (D)
Explanation:

See Question 4 of http://www.geeksforgeeks.org/data-structures-and-algorithms-set-4/
This solution is contributed by Anil Saikrishna Devarasetty

