Binary search tree (BST) can be represented by a linked data structure. Each node
contains key
value, data
and references to left
and right
subtree.
BST has following properties:
- Left subtree of a node contains only nodes with keys less than the node's key.
- Right subtree of a node contains only ondes with keys greater than the node's key.
- Left and Right subtrees are also binary search trees.