Binary Search Tree

From Wiki :-)
Revision as of 05:10, 3 October 2020 by Savoundg (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

A Binary Search Tree is a binary tree with a specific ordering property: for any sub-tree, the left nodes is less that the root node and the right nodes is bigger to the root node.

Searching in a Binary Search Tree is really fast thanks to its ordering property.

Insertion in a Binary Search Tree can unbalance the tree.

Find and insert operations in a unbalanced Search Tree is O(n) whereas it is O(log n) in a balanced tree.

In order in Binary Search Tree, the in-order traversal is preferred.