Does my height function destroy my O(log N) AVL tree insert and remove? How to implement height?
<p>I have implemented an AVLtree but now that it is finished I thought of something. Basically I compute the height by calculating the height of each subtree each time.
algorithm is something like:</p>

<pre><code>if node is null return -1;
else return 1 + max( height(left), height(right))
</code></pre>

<p>Ths means when i check if my tree is balanced I use this function. But height this way is LINEAR right? so that means remove and insert will be N log N or N, not log N?</p>
