I am just wondering if someone might be able to clarify the definition of a balanced tree for me. I have that \"a tree is balanced if each sub-tree is balanced and the heigh
Balanced tree is a tree whose height is of order of log(number of elements in the tree).
height = O(log(n))
O, as in asymptotic notation i.e. height should have same or lower asymptotic
growth rate than log(n)
n: number of elements in the tree
The definition given "a tree is balanced of each sub-tree is balanced and the height of the two sub-trees differ by at most one" is followed by AVL trees.
Since, AVL trees are balanced but not all balanced trees are AVL trees, balanced trees don't hold this definition and internal nodes can be unbalanced in them. However, AVL trees require all internal nodes to be balanced.