Question: algorithm to find the max with k segments. Problem 3. Given are n segments lai, bij, i-1, 2, . . . , , on a

algorithm to find the max with k segments. Problem 3. Given are n segments lai, bij, i-1, 2, . . . , , on a line. Propose an mum integer k such that some point on the line is covered For instance, for the following 5 segments [-0.3,2.7],-1,0.51, 2.5,3.3,I-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 0.5 1.7 2.3 25 3.3 You will get a full credit, if your algorithm has the running time O(n log n). If the running time of your algorithm is larger than O(nlogn), you may be given a partial credit depending on the quality of the algorithm
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
