Binary Search Tree
What is a BST?
A Binary Search Tree (BST) is a node-based binary tree data structure where each node has a comparable key (and associated value) and satisfies the property:
- The left subtree of a node contains only nodes with keys lesser than the node’s key.
- The right subtree of a node contains only nodes with keys greater than the node’s key.
- Both left and right subtrees must also be binary search trees.
Diagram
Learn More
Visit Wikipedia - Binary Search Tree for more details.