Question: 3. (20 points) This problem is concerned with range queries (we have discussed a similar problem in class) on a binary search tree T whose

3. (20 points) This problem is concerned with range queries (we have discussed a similar problem in class) on a binary search tree T whose keys are real numbers (no two keys in T are equal). Let h denote the height of T. The range query is a generalization of the ordinary search operation. The range of a range query on T is defined by a pair (11, [y], where I and Ir are real numbers and Ir. Note that I and Ly may not be the keys in T. You already know that T can support the ordinary search, insert, and delete operations, each in O(h) time. You are asked to design an algorithm to efficiently perform the range queries. That is, in each range query, you are given a range [71, xr], and your algorithm should report all keys 2 stored in T such that Il
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
