Binary Search Tree

Relationships of BST

  • For a binary tree to be a binary search tree, the data of all the nodes in the left sub-tree of the root node should be ⩽ the data of the root. The data of all the nodes in the right subtree of the root node should be > the data of the root.
  • Arrays: Linear traversal v/s Binary Serach Tree traversal