a binary search tree is a binary tree that has the following restrictions:
- the keys of all the nodes in the left subtree of any given node
x
is smaller than the key ofx
- the keys of all the nodes in the right side of the tree are bigger or equal to the key of
x
for example the following tree is a binary search tree: