Answered step by step
Verified Expert Solution
Question
1 Approved Answer
CSC 2 2 0 Data Structures Homework # 4 ( follows: L 8 . 1 Binary Search Trees & L 8 . 2 2 -
CSC Data Structures
Homework #
follows: L Binary Search Trees & L Trees
Name: Due: Wed, Jan th
pts Carry out the following operations showing the resulting binary search tree after all operations. Draw the tree in the space to the right of the operations. Assume the tree is initially empty ie the root is null
a insert
b insert
c insert
d insert
e insert
f insert
g insert
pts Take the same tree from question and show the result of running the following traversal operations. Assume each operation returns the integer values separated by commas as it processes each node.
a inorder
b preorder
c postorder
pts Take the same tree from question and show the resulting binary search tree after each of the following operations. After performing the operation, use the resulting tree for the next operation.
a delete
b delete
c delete
d delete
pts Carry out the following operations showing the resulting tree after each operation. Assume the tree is initially empty ie the root is null After performing the operation, use the resulting tree for the next operation.
a insert
b insert
c insert
d insert
e insert
f insert
OPTIONAL For further practice, figure out what the tree would look like if we inserted into the tree from part f What if we inserted into the tree from part f How about Take the tree from part f as the starting point each time. This will help you with cascading splits which may be useful for the exam. For further practice, do the problems from the workbook.
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