Algorithm Recursive (n)
{
if (n ==1) return (1)
else
return (Recursive(n – 1) + Recursive(n – 1))
}
Find time complexity of the above algorithm ?
1
O(n2)
2
O(2n)
3
O(n log n)
4
O(nn)
5
Question Not Attempted
Algorithm Recursive (n)
{
if (n ==1) return (1)
else
return (Recursive(n – 1) + Recursive(n – 1))
}
Find time complexity of the above algorithm ?