QUESTION 3 [30 MARKS] Given a sequence of numbers as follows: (a) (b) (c) (d) 30,25,41,15,27,35,45,10,17,33,43,53,6,13,2
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
QUESTION 3 [30 MARKS] Given a sequence of numbers as follows: (a) (b) (c) (d) 30,25,41,15,27,35,45,10,17,33,43,53,6,13,2
QUESTION 3 [30 MARKS] Given a sequence of numbers as follows: (a) (b) (c) (d) 30,25,41,15,27,35,45,10,17,33,43,53,6,13,20,50,55 Construct a Binary Search Tree (BST) for the sequence of numbers above. [17 Marks] Based on your BST in (a), insert the values of 37 and 18. Draw the new BST. How the tree looks like after 20 is deleted? Draw the new tree. [2 marks] [1 mark] Based on the post-order and in-order traversals below, construct a binary tree. Post-order: 9,1,2,12,7,5,3,11,4,8 In-order: 9,5,1,7,2,12,8,4,3,11 [10 Marks]