ISRO exam 2015 – Question 40 with Solution
In this video we are going to discuss another question which was asked in the exam of ISRO
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)