Binary Search Tree (BST)
A Binary Search Tree (BST) is a binary tree where each node
has a comparable key, and satisfies the binary search property:
all keys in the left subtree are smaller, and all keys in the right subtree are larger.
Key Properties
- Each node has at most two children.
- Left child’s key < parent’s key.
- Right child’s key > parent’s key.
Common Operations
- Insertion: Add a new node at the correct position based on key value.
- Search: Traverse left or right depending on key comparison.
- Deletion: Remove a node and maintain BST structure.
Example BST Structure:
Learn more at
Wikipedia: Binary Search Tree
.