Question: Q1) Part A (9 points): Here is a small binary tree: 18 6 11 1 3 10 25 7 44 Write the order of the

 Q1) Part A (9 points): Here is a small binary tree:

Q1) Part A (9 points): Here is a small binary tree: 18 6 11 1 3 10 25 7 44 Write the order of the nodes visited in: a. An in-order traversal: b. A pre-order traversal: c. A post-order traversal: Part B (10 points): Suppose you have the following binary search tree. 10 16 a. Add number 5: Show how number 5 will be added in term of comparisons. b. Draw the tree after adding 5. c. Write the function that will add a node to BST. d. Write the function that will delete a node from the BST. e. Draw the tree after deleting 20

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!