1.

Why It Is Said That Searching A Node In A Binary Search Tree Is Efficient Than That Of A Simple Binary Tree?

Answer»

In binary search tree, the nodes are arranged in such a way that the left node is having less data value than ROOT node value and the right nodes are having larger value than that of root. Because of this while searching any node the value of the TARGET node will be compared with the parent node and accordingly either left sub branch or right sub branch will be searched. So, ONE has to compare only PARTICULAR branches. Thus searching BECOMES efficient.

In binary search tree, the nodes are arranged in such a way that the left node is having less data value than root node value and the right nodes are having larger value than that of root. Because of this while searching any node the value of the target node will be compared with the parent node and accordingly either left sub branch or right sub branch will be searched. So, one has to compare only particular branches. Thus searching becomes efficient.



Discussion

No Comment Found