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)):
}
1
O(n)
2
O(n log n)
3
O(n2)
4
O(2n)
5
Question Not Attempted
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)):
}