AI engineering glossary · Data structures algorithms
What is BST (binary search tree)?
Binary search tree (also called BST): A binary tree where every node's left subtree holds smaller keys and its right subtree holds larger keys. Searching, inserting and deleting follow one path from the root, taking time proportional to the tree's height, about log n when balanced.
Binary search tree: an example
Searching for 40 in a tree with root 50: 40 is smaller, so go left, reaching the answer without visiting the right side at all.
Related terms
More Data structures algorithms terms
- Binary tree
- Bipartite graph
- Bloom filter
- Breadth-first search
- Bubble sort
- Call stack
- Circular buffer
- Coin change problem
Where you learn it
Binary search tree is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.