Question: 6. We need to maintain a data structure for a set of n items. Each item is given with a unique id. We need to

6. We need to maintain a data structure for a set of n items. Each item is given with a unique id. We need to enable the following operations, each in expected time O(logn). In all the operations below, 1, 11, and 22 are all ids of items. (a) Insert (2, S) The item whose id is x has arrived, and is inserted into the data structure. (b) Delete (1,5) The item whose id is x is removed. (c) Count (21,02) Report how many items in the data structure have ids between 21 and 22, (including 21 and 22). Hint use other questions in this
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
