Question: Modify binary search trees so that to support the following operations: 1 . TREE - SEARCH ( T , k ) - return the element
Modify binary search trees so that to support the following operations:
TREESEARCHTk return the element in T that has key k; if no element in T has
key k return NIL.
INSERTT x insert an element x into T assume T contains no objects with key
xkey
DELETETx delete an element x from T assume x is in T
COUNTTx here x is a node in T; return the number of descendants of x that have
two children.
Procedures TREESEARCH, INSERT and DELETE may have to be modified from their
original binary search tree counterparts. Explain why or why not modifications are needed
pt Describe the modifications no need for a pseudocode just a narrative how the
procedures would change pt Estimate the running time of your solution pt For
full credit correct optimal solutions are required.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
