Question: 1. A Binary Search Tree (BST) is a binary tree where each node contains a value from a well-ordered set. (a) Insert the following sequence

1. A Binary Search Tree (BST) is a binary tree where each node contains a value from a well-ordered set. (a) Insert the following sequence of numbers in this order into an initially empty BST. Draw the BST after the insertion of each number. 6, 2, 4, 7, 10, 11, 13, 15, 5, 3, 12, 14, 9, 8, 16, 1 marks) (b) Delete the following sequence of numbers in this order from the final BST in Question 1(a). Draw the BST after the deletion of each number. 5, 6, 7, 8, 10, 9 (5 marks) (c) Given the following orders of traversal of a binary tree, recreate the tree. Postorder: G,D, B, H, I, E, F, C, A Inorder: D, G, B, A, B, E, I,C,E (10 marks)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
