May 2017
Intermediate to advanced
310 pages
8h 5m
English
A binary search tree (BST) is a special kind of a binary tree. That is, it is a tree that is structurally a binary tree. Functionally, it is a tree that stores its nodes in such a way to be able to search through the tree efficiently.
There is a structure to a BST. For a given node with a value, all the nodes in the left sub-tree are less than or equal to the value of that node. Also, all the nodes in the right sub-tree of this node are greater than that of the parent node. As an example, consider the following tree:

This is an example of a BST. Testing our tree for the properties of a BST, you realize that all the nodes ...