every node makes two recursive calls so why its not O(2^n)
For count number of nodes why is time complexity O(n)
as we are moving to every node at onces so time complexity is o(n)
you are saying it should be O(2^n)
actually it should be O(2^h) where h is height of tree and h=log2(n);
hence it comes out to be O(n)