Skip to content

Glossary: Data Structures and Algorithms in C++

Balanced tree

Also written: balanced, unbalanced

A tree whose subtrees have similar heights, so its height is about log₂ n and lookups are O(log n). Inserting sorted IDs into a plain BST makes an unbalanced chain instead.

Where the book teaches it

Related terms

HeightSelf-balancing treeBinary search tree (BST)