Question: Given an interval tree T and an interval i, describe how to list all intervals in T that overlap i in O(min(n, k lg n))

Given an interval tree T and an interval i, describe how to list all intervals in T that overlap i in O(min(n, k lg n)) time, where k is the number of intervals in the output list. One simple method makes several queries, modifying the tree between queries. A slightly more complicated method does not modify the tree.

Step by Step Solution

3.23 Rating (161 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

INTERVALSSEARCHT x i let list be an empty array if i ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Introduction to Algorithms Questions!

Related Book