Note: No code is needed only tree diagram after performing the operations are needed.
Consider the following :
root=5
root->left=3
root->left->right=4
root->left->left=2
root->left->left->left=1
root->right=8
root->right->left=7
root->right->left->left=6
root->right->right=14
root->right->right->right=15
root->right->right->left=13
root->right->right->left=10
root->right->right->left->left=9
root->right->right->left->right=11
Task:
Your task is to Draw the modified Tree diagram under each of the following operations.(Note :the two operations are independant.Each of them starts from the above tree)
a)Deletion of the key with data 4
b)Insertion of the key 16
The required tree diagram is
b) The delete of key 4 is given below
c) Insert 16 tree diagram
Comments
Leave a comment