A binary search tree is a binary tree storing keys (or key-value entries) at its internal nodes and satisfying the following property:
- If we let , , and be three nodes such that is in the left subtree of and is in the right subtree of . We have that .
- External nodes do not store items.
- An In-order traversal of binary search tree visits the keys in increasing order.