in the given binary tree (I) Insert : 5,31
Attachments:
Answers
Answered by
2
Step-by-step explanation:
Binary Search Tree is a node-based binary tree data structure which has the following properties:
1.) The left subtree of a node contains only nodes with keys lesser than the node’s key.
2.) The right subtree of a node contains only nodes with keys greater than the node’s key.
3.) The left and right subtree each must also be a binary search tree. There must be no duplicate nodes.
The above properties of Binary Search Tree provides an ordering among keys so that the operations like search, minimum and maximum can be done fast. If there is no ordering, then we may have to compare every key to search for a given key.
Similar questions