Suppose we are given an array, A, of n nonintersecting segments, s 1 , s 2 ,...,s

Question:

Suppose we are given an array, A, of n nonintersecting segments, s1, s2,...,sn, with endpoints on the lines y = 0 and y = 1, and ordered from left to right. Given a point q with 0 < y(q) < 1, design an algorithm that in O(log n) time computes the segment si of A immediately to right of q, or reports that q is to the right of all the segments.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Algorithm Design And Applications

ISBN: 9781118335918

1st Edition

Authors: Michael T. Goodrich, Roberto Tamassia

Question Posted: