Binary Search Tree Presentation
Binary Search Tree Presentation
Tree
• Binary Search tree can be defined as a class of binary trees, in
which the nodes are arranged in a specific order.
• In a binary search tree, the value of all the nodes in the left sub-
tree is less than the value of the root.
• This rule will be recursively applied to all the left and right sub-
trees of the root.
Insertion in Binary Search Tree
•
(BST)
A new key is always inserted at the leaf by maintaining the property
of the binary search tree.
• We start searching for a key from the root until we hit a leaf node.
• Once a leaf node is found, the new node is added as a child of the
leaf node.
Q. Create the binary search tree using the following data elements.
43, 10, 79, 90, 12, 54, 11, 9, 50