Deletion from a binary search tree

Published on Slideshow
Static slideshow
Download PDF version
Download PDF version
Embed video
Share video
Ask about this video

Scene 1 (0s)

Deletion from a binary search tree. Made by : p Gaurav Kumar Naidu (F_35) Aniket Nayak (F_12).

Scene 2 (10s)

Properties of binary search tree. The left subtree of a node contains only nodes with keys lesser than th nodes key. The right subtree of a node contains only nodes wih keys greater than the nodes key. The left and right subtree each must also be a binary search tree..

Scene 3 (26s)

6. 2. 8. 1. 4. 3.

Scene 4 (34s)

Properties of binary search tree. The left subtree of a node contains only nodes with keys lesser than th nodes key. The right subtree of a node contains only nodes wih keys greater than the nodes key. The left and right subtree each must also be a binary search tree..

Scene 5 (50s)

6. 2. 8. 1. 4. 3.

Scene 6 (58s)

Properties of binary search tree. The left subtree of a node contains only nodes with keys lesser than th nodes key. The right subtree of a node contains only nodes wih keys greater than the nodes key. The left and right subtree each must also be a binary search tree..

Scene 7 (1m 14s)

6. 2. 8. 1. 4. 3.

Scene 8 (1m 23s)

DELETION FROM A BINARY SEARCH TREE.

Scene 9 (1m 29s)

THINKS TO KEEP IN MIND TO DELETE FROM A BINARY SEARCH TREE.

Scene 10 (1m 40s)

Case 1 : Delete From Leaf Node. 6. 2. 8. 0. 4. 3.

Scene 11 (1m 54s)

Case 2: Node Having One child. In this case just send the current’s node child to its parent’s place.

Scene 12 (2m 3s)

6. 2. 8. 0. 4. 3.

Scene 13 (2m 12s)

6. 2. 8. 0. 4. 3. Delete 3. 6. 2. 8. 0. 4.

Scene 14 (2m 23s)

Case 3: Node has both children. Find inorder successor of the node.Copy contents of the inorder successor to the node and delete the in order successor.note that inorder predessor can also be used..

Scene 15 (2m 36s)

6. 8. 9. 0. 5. 7. 6.

Scene 16 (2m 45s)

6. 8. 9. 0. 5. 7. 6. Delete 8. 6. 7. 9. 0. 5. 7. 6.

Scene 17 (2m 57s)

6. 7. 9. 0. 5. 6.

Scene 18 (3m 6s)

6. 8. 9. 0. 5. 7. 6. Delete 8. 6. 7. 9. 0. 5. 7. 6.

Scene 19 (3m 20s)

Time complexity. The worst case time complexity of the delete operation is O(h) where h is the height of the binary search tree.In worst case, we may have to travel from the deepest leaf node.The height of a skewed tree may become n and the time complexity of delete operation may became O(n).

Scene 20 (3m 36s)

THANKS FOR WATCHING THE VIDEO TILL NOW. If any doubt in this topic comment below.