Question
3. [5 pts.] Draw the tree that results from deleting key 20 from the following splay tree. NOTE: When deleting a key from a splay
3. [5 pts.] Draw the tree that results from deleting key 20 from the following splay tree. NOTE: When deleting a key from a splay tree, please follow the textbook approach of first finding the node with the key using the function for standard binary search trees. If the key is in the tree and the node w where the key is found does not have any child pointing to NULLone, then use the implementation of the algorithm that finds the successor node x to node w in an inorder traversal of the binary search tree, and copies the entry information (i.e., not including the children or parent pointers) from x to w (e.g., the key and value stored at node x becomes that of node w). That algorithm then deletes node x from the splay tree and splays its parent node.
(25 15 35 20 (30 50 27) (32) (40) 60Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started