Module 04 Trees
Module 04 Trees
TREES
Insert 65
65
BST - Insertion
40, 30, 20, 50, 60, 70, 10, 80
BST-Insertion
50, 30, 10, 60, 80, 20, 70, 55, 35, 5
BST - Insertion
10, 5, 15, 2, 8, 13, 19, 6
Deletion in BST
1. Deleting a node with no child
Leaf nodes – 1, 4, 7, 13
Deleting a node having one child
- Child will replace the position of parent