Question 1: 4 marks Build a Binary Search Tree with the given input order. You must show the step-by-step process of ins
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Question 1: 4 marks Build a Binary Search Tree with the given input order. You must show the step-by-step process of ins
Question 1: 4 marks Build a Binary Search Tree with the given input order. You must show the step-by-step process of inserting the inputs, including both recursive calls and tree diagrams for each step. [ refer to the Insertitem function of Binary Search Tree Lecture slides to get an idea of doing this.] N.B: Unique Input orders for each student to build the tree are given on a separate file. Write down the input order on your answer script before answering the question. You must use the assigned input order. Do not change the order. Question 2: 3 marks Write down the inorder, preorder, and post-order traversal of the tree you made in Question 1. Question 3: 3 marks Delete the Left Node of level 1 from the tree you have built in Question 1. Show the step-by-step procedure of deleting and draw the final status of the tree after deletion is completed. Now, you have a new tree that is different from the previous tree. Delete the Right Node of level 1 from this derived tree. Show step-by-step procedure of deleting and draw the final status of the tree after deletion is completed. N.B: You may not have any left node or right node in level 1; in that case, state that node left/right node on level 1 to delete.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!