Balanced binary tree (source code)

= Balanced binary tree

A binary tree whose subtree sizes or heights satisfy a stated balance condition. Recursively splitting an $n$-element sorted list into sizes $\lfloor n/2\rfloor$ and $\lceil n/2\rceil-1$ gives logarithmic height and child sizes differing by at most one. This is a static construction; ordinary <binary search tree> insertion does not automatically retain balance.