Reputation: 19434
Why Binary Tree data structure considered as better than when compared to linear data structures? Please explain with a suitable diagram.
Upvotes: 0
Views: 246
Reputation: 20430
(Posted on behalf of the OP).
A binary tree is special because when you are searching it you repeatedly decide whether to follow the left branch or the right branch eliminating half of the tree each time (assuming the tree reasonably well is balanced). In fact, this is what you do each time you add a node.
Take a look at http://www.computersciencebytes.com/array-variables/binary-trees/.
Upvotes: 1