Question: Design (in detail) and analyze a data structure that will hold a set of n weighted intervals of the real line, that is, a set

Design (in detail) and analyze a data structure that will hold a set of n weighted intervals of the real line, that is, a set of triples (a, b, w) such that a, b and a < b and w is a positive integer. Think of a as the left endpoint and b the right endpoint of a segment of the real line. A query to this data structure will consist of a value z and will ask for the heaviest interval containing z. You data structure should require O(nlogn) preprocessing time, and then O(logn) time to process a query.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!