Binary Search Tree
Binary Search Tree (BST) is a node-based binary tree data structure having the following properties:
- The left subtree of a
node contains only nodes with keys less than the node’s key.
- The right subtree of
a node contaisns only nodes with greater than the node’s Key.
- The left and
right subtree each must also be a binary search tree.
BST has some
basic operation like Search, Insert, Delete, Traversal (In-order, pre-order,
post-order).If we want to delete a node from BST, Firstly we search this node
and delete this node.
Now we make a
BST using some data and following the BST properties. The data is given below:
47,40,54,38,30,39,49,60,57,80;
No comments:
Post a Comment