Given a binary search tree $T$, we insert $n$ elements, but when the size of tree become doubled then we balance the tree. for example if we insert $2^{k-1}$ element then when the size become to $2^k$ then we balance $T$. what is time complexity insert $n$ items in such tree?
I think be $O(n)$, but when i want draw a such tree i get stuck.