Question
1.An AVL tree of height 3 must have at least _____ nodes. (Assume a node with no children has height 0). 21 12 7 14
1.An AVL tree of height 3 must have at least _____ nodes. (Assume a node with no children has height 0).
21
12
7
14
2.Consider the following AVL tree. Create the tree after insertion of 17 followed by deletion of 26 (assuming deletion replaces the node with the inorder successor, if possible).
What is the new root of the tree?
16
14
17
40
3.Is the following tree an AVL tree? If not, indicate which node violates the AVL property.
15 violates the AVL tree property
04 violates the AVL tree property
05 violates the AVL tree property
Tree is an AVL tree
4. What happens if you delete 15 from the tree below?
The tree becomes non AVL and a left rotation at 20 is required
The tree becomes non AVL and a double rotation at 20 is required
10 becomes a child of 20 and no other changes are required
22 becomes the new root
26 14 42 18 16 05 04 08 10 22 30Step 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