Page 1 of 1

Implement the list of instructions below on an initial empty AVL tree. Give the parent implementation of the tree at the

Posted: Mon Jun 06, 2022 12:40 pm
by answerhappygod
Implement the list of instructions below on an initial empty AVL
tree. Give the parent implementation of the tree at the indicated
points. Type NULL as the parent for the root of the tree. For the
deletion, assume in-order predecessor replacement strategy, where
applicable.
1. insert P
2. insert R
3. insert O
4. insert M
5. insert U
6. insert L
7. delete P
8. insert G
9. insert A
10. insert T
11. insert E
12. insert D
13. delete E
Give the parent array representation of the tree after the sixth
instruction (6 blanks)
Parent[item] _
_ _
_ _
_
Item

P R
O M
U L
Give the parent array representation of the tree after the
seventh instruction (5 blanks)
Parent[item] _
_ _
_ _
Item
R
O M
U L
Give the parent array representation of the tree after the
twelfth instruction (10 blanks)
Parent[item] _
_ _
_ _
_
_ _
_ _
Item
R O
M U
L G
A T
E D
Give the parent array representation of the tree after the
thirteenth instruction (9 blanks)
Parent[item] _
_ _
_ _
_
_ _ _
Item
R O
M U
L G
A T D