I am trying to find complexity of Fibonacci series using a recursion tree and concluded height of tree = O(n) worst case, cost of each level = cn,
height of tree = O(n)
cost of each level = cn
t(n)=t(n-1)+t(n-2) which can be solved through tree method:
t(n-1) + t(n-2) 2^1=2 | | t(n-2)+t(n-3) t(n-3)+t(n-4) 2^2=4 . . 2^3=8 . . . . . .
similarly for the last level . . 2^n it will make total time complexity=>2+4+8+.....2^n after solving the above gp we will get time complexity as O(2^n)