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.

Level: intermediateTopic: Data structures algorithms

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

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.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.