Algorithms with JavaScript: Binary Search Tree
A tree is a very popular non linear data structure. It’s a collection of nodes which are organized in hierarchical order. The first node is the root element of the tree and from this point the tree starts growing. Tree can have only one root element. What’s unique about binary search tree is that nodes are ordered based on the value they stored. Values which are stored in the left sub-tree are always less than values stored in the node and vs values in the right subtree are always greater than in the node.