Question: 4. (20 points) Answer the following questions about binary search trees (BSTs). (a) Draw the final BST after inserting elements 60,25,15,8,35,27,82,73,50, 40,77,92,88,90 in that order.
4. (20 points) Answer the following questions about binary search trees (BSTs). (a) Draw the final BST after inserting elements 60,25,15,8,35,27,82,73,50, 40,77,92,88,90 in that order. (b) Draw the tree after deleting 15 from the BST in (a). (c) Draw the tree after deleting 60 from the resulting tree of (b) using the largest element in the left subtree for replacement. (d) Draw the tree after deleting 82 from the resulting tree of (c) using the smallest element in the right subtree. (e) List the elements of pre-order, in-order, and post-order traversals of the resulting tree of (d)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
