Section: STEM · Computer ScienceDifficulty: Medium

Binary Tree

USUK

A hierarchical data structure where each node has at most two children.

Also: BST · binary search tree

Definition

A binary tree is a tree data structure in which each node has at most two child nodes, referred to as the left child and the right child. Special forms include binary search trees (BSTs), where the left subtree contains only nodes with smaller values and the right subtree contains larger values, enabling efficient search and insertion. Binary trees are used in databases, compilers, and expression parsing.

Example

A binary search tree stores a company's employee IDs so that any employee's record can be found in O(log n) time: each comparison halves the search space, making lookups among millions of records nearly instantaneous.

Synonyms

  • BST
  • hierarchical tree
  • two-child tree

Antonyms / Opposites

  • linear list
  • array

Images

CC-licensed · free to use
More on Wikimedia
Loading images…

Video

Dictionary Entry

Back to STEM