int func3(int n){
if (n <= 1) return n;
return func3(n - 1) + func3(n - 1);}
My thinking is: in every recursion we have an addition operation. And we do this operation every time we divide the recursion into two. So I am not sure if I should call it O(N2^N) or O(2^N). I think that O(N2^N) makes more sense since we are dividing the problem into 2^N pieces and adding them separately. Still though I am unsure. So can someone guide me through by showing their steps?
func3(n-1)just once, i.e.tmp = func3(n-1); return tmp+tmp, or justreturn 2*func3(n-1)2 * func3(n-1)?