Skip to content

Glossary: Data Structures and Algorithms in JavaScript

Balanced tree

Also written: balanced, unbalanced

A tree whose subtrees are about the same height at every node, so its height is about log₂ n and lookups are O(log n). An unbalanced tree, such as one built from sorted inserts, becomes a chain with O(n) lookups.

Where the book teaches it

Related terms

Binary search tree (BST)Self-balancing treeHeight