I have an AVL Tree, n nodes in it, what's the maximum difference of nodes that can be from left sub root tree and right sub root tree?
So I'm not quite sure but first of all let's fill all the right sub tree with nodes, so we have n/2 + 1 nodes filled, we're left with n - n/2 + 1 nodes to full in the left sub tree, and I want to insert the minimum nodes now there so the height won't be higher than 1. so I believe I need to add about logn - 1 nodes, like a chain (always to the right child or always to the left child).
second idea, maybe build two chains of nodes, one in the right sub-tree and one in the left sub-tree so the height won't exceed 1 between the sub trees. but this won't be the maximum difference i guess
Any ideas?