Question: pesudcode with detail comment 1 Question 1. Suppose we need a data container for storing multiple distinct integers, and we need to frequently run the
pesudcode with detail comment

1 Question 1. Suppose we need a data container for storing multiple distinct integers, and we need to frequently run the following operations: . searching, insertion, and deletion . selection: identifying the i-th largest integer We decide to implement a binary search tree (just a normal binary search tree, not AVL), as binary search tree's average performance is quite good for searching, insertion, and deletion. Then, to make selection more efficient, we decide that our tree nodes will store three pieces of information (the value itself, plus two additional pieces of book-keeping information): . The integer value that we need to store . How many nodes are in the left child branch . How many nodes are in the right child branch We call our new data structure ADSA Binary Search Tree (ABST). Now you are asked to fill in the implementation details. We are looking for algorithms that are efficient and elegant. This is an open ended question without a specific standard answer. . Given an ABST, how to find the i-th largest integer? Please provide pseudocode. (2 marks: 1 for correctness and 1 for efficiency and elegance) . How to perform insertion to an ABST? Please provide pseudocode. Note that you need to maintain the correctness of all book-keeping information, i.e, for every node, you need to update how many nodes are in the child branches. (4 marks: 2 for correctness, 1 for efficiency, 1 for elegance) . How to perform deletion from an ABST? To make this problem easier, you only need to consider the case where the node to be deleted has only one child branch. Please provide pseudocode. (4 marks: 2 for correctness, 1 for efficiency, 1 for elegance)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
