Question
C++ homework a) Inserting a node i) Draw the Binary Search Tree resulting from the insertion of an entry with key 32 into the AVL
C++ homework
a) Inserting a node
i) Draw the Binary Search Tree resulting from the insertion of an entry with key 32 into the AVL tree in Figure 1.
ii) Indicate on this tree the three nodes that will be involved in Trinode restructuring
iii) Perform the trinode restructuring (using the handout on Titanium) and draw the final AVL tree.
b) Deleting a node.
i) Draw the Binary Search Tree resulting from the deletion of the entry with key 40 into the AVL tree in Figure 1. (start all over from the tree in figure 1, not from the result of part a)
ii) If the tree is unbalanced, indicate on this tree the three nodes that will be involved in Trinode restructuring
iii) If the tree is unbalanced, perform the trinode restructuring and draw the final AVL tree.
iv) Is the tree balanced? If not, repeat step iii
35 45 15 Figure 1. AVL Tree a) Inserting a node i Draw the Binary Search Tree resulting from the insertion of an entry with key 32Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started