What is a Binary Search Tree?

Binary Search Tree, popularly known as BST, is a sorted Binary Tree. They are suited for lookup using Binary Search. Like Binary Trees BSTs can also be localized to a left child, node, right child (LNR). The general rule of thumb followed in case of BST will be the sorted order of the same L<N<R. This translates to the logic of the left child/tree having elements having a value smaller than the value of the Node and the right child/tree having elements having value greater than the Node value.
An example of a BST is as follows.

You can store the BST in the same way as a Binary Tree. Explained here

core java 12

FOLLOW US ON LinkedIn



Explore Tutu'rself