Advantages Of Binary Search Tree Over Hash Table
Advantages Of Binary Search Tree Over Hash Table In programming, we have come across BST and Hash Table applications very often. But most of the times we prefer to use hash table even if the space complexity increases. But in this article, we will be looking into the advantages and places where we prefer to use Binary Search Tree over Hash Table. Let us first revisit BST and Hash table . Ø What is Binary Search Tree ? A BST is a type of tree data structure where for every node, all the nodes to the left of this node have value lesser than the current node’s value and all the nodes to the right of this node has value greater than the current node’s value along with the fact that both left subtree and right subtree are Binary Search Trees. Ø Example: One application of this is basically when we get a stream of incoming data and we want to arrange them systematically in a sorted order in efficient way. ...