Question: Suggest modifications to the interval-tree procedures to support the new operation INTERVAL-SEARCH-EXACTLY (T, i), where T is an interval tree and i is an interval.
Suggest modifications to the interval-tree procedures to support the new operation INTERVAL-SEARCH-EXACTLY (T, i), where T is an interval tree and i is an interval. The operation should return a pointer to a node x in T such that x.int.low = i.low and x.int.high = i.high, or T.nil if T contains no such node. All operations, including INTERVAL-SEARCH-EXACTLY, should run in O(lg n) time on an n-node interval tree.
Step by Step Solution
3.44 Rating (167 Votes )
There are 3 Steps involved in it
Search for nodes which has exactly the same lo... View full answer
Get step-by-step solutions from verified subject matter experts
