1. Engineering
  2. Computer Science
  3. problem 3 given are n segments a b i12 n...

Question: problem 3 given are n segments a b i12 n...

Question details

Problem 3. Given are n segments a, b, i-1,2,... ,n, on a line. Propose an algorithm to find the maximum integer k such that some point on the line is covered with k segments For instance, for the following 5 segments -0.3, 2.7], -1, 0.5], [2.5, 3.3],-0.7,2.3], 0.5,1.7 (see the picture below), the answer is k - 4, because a point 0.5 is covered with 4 segments. Note also that you do not need to find this point (or points); the only thing that you have to find is k. 0.3 0.5 2.7 0.7 1.7 2.3 2.5 3.3 0.5 You will get a full credit, if your algorithm has the running time O(nlogn). If the running time of your algorithm is larger than O(n log n), you may be given a partial credit depending on the quality of the algorithm

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution