modify the standard definition of a binary search tree to add a field N.size at each Suppose that we node, which records the size of the subtree under N'Tincluding N itself). A. Explain how to modify the procedure for adding both the case where X is not yet in the tree and is added, and the case where X is already in the tree, and the tree remains unchanged. element X to a tree. Be sure to consider an You only need to describe the changes that are made to the standard algorithm; you do not have to repeat the standard algorithm. B. Explain how to modify the procedure for deleting an element. As in (A), consider both cases. C. Describe a procedure for finding the kth largest element in the tree. D. Describe a procedure for finding the number of elements in the tree less than X All of these procedures should run in time proportional to the height of the tree.
https://www.ukbestwritings.com/wp-content/uploads/2021/05/uk-best-writings-300x45.png 0 0 Ukbwadmin https://www.ukbestwritings.com/wp-content/uploads/2021/05/uk-best-writings-300x45.png Ukbwadmin2021-07-09 19:18:402021-07-22 09:05:12modify the standard definition of a binary search tree to add a field N.size at each Suppose that we