Question
1.) Carry out the following operations showing the resulting binary search tree after ALL operations. Draw the tree and assume the tree is initially empty.(The
1.) Carry out the following operations showing the resulting binary search tree after ALL operations. Draw the tree and assume the tree is initially empty.(The root is null).
a.) insert(45)
b.) insert(20)
c.) insert(30)
d.) insert(60)
e.) insert(80)
f.) insert(70)
g.) insert(10)
2.) Take the same tree from question 1 and show resulting binary search tree after each of the following operations. After performing the operation, use the resulting tree for the next question.
a.) delete(30)
b.) delete(80)
c.) delete(45)
d.) delete(60)
3.) Carry out the following operations showing the resulting tree 2-3 tree after EACH operation. Assume the tree is initially empty.
a.) insert(45)
b.) insert(20)
c.) insert(30)
d.) insert(60)
e.) insert(80)
f.) insert(70)
Step 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