in Programming in C
1,431 views
0 votes
0 votes
Are deletion and insertion commutative in nature for BST??
in Programming in C
by
1.4k views

1 comment

let X is root, it's inorder successive is Y ===> X < Y.

If i delete X, then Y is the Root.

Now i want to insert a element Z which is less than Y and grater than X, then it is placed in right subtree of Y.

Note that in this process, the root is Y

 

let X is root, it's inorder successive is Y ===> X < Y.

Now i want to insert a element Z which is less than Y and grater than X, then it is placed left of Y.

∴ Now inorder successive is Z.

If i delete X, then Z is the Root.

Hence, " Are deletion and insertion commutative in nature for BST ? " ---- NO
0
0

Please log in or register to answer this question.