retagged by
240 views

2 Answers

0 votes
0 votes

After inserting 7, 3, 11, 13 in the AVL Tree, the structure of the AVL Tree will be as follows:

*****************************************************

Root Node = 7

Left Child of '7' = 3

Left & Right Child of '3' = NULL

Right Child of '7' = 11

Left Child of '11' = NULL

Right Child of '11' = 13

Left & Right Child of '13' = NULL

END of the AVL Tree

*****************************************************

After inserting '12' to the above AVL Tree, the structure of the AVL Tree will be as follows:

*****************************************************

Root Node = 7

Left Child of '7' = 3

Left & Right Child of '3' = NULL

Right Child of '7' = 12

Left Child of '12' = 11

Left & Right Child of '11' = NULL

Right Child of '12' = 13

Left & Right Child of '13' = NULL

END of the AVL Tree

*****************************************************

Therefore, the Final Root Node will be 7.

Related questions

0 votes
0 votes
2 answers
1
Tushar Shinde asked Jan 15, 2016
909 views
I am stuck after JAN. It is not getting balanced even after 2 rotations. Can somebody help?
3 votes
3 votes
1 answer
2