Question: 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
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
