Endpoints of the intervals


We are given n intervals in real line, where the left and the right endpoints of the intervals are stored in the arrays L[1..n] and R[1..n], respectively. In a proper coloring, each interval is assigned a color such that any two overlapping intervals have different colors. Design an efficient algorithm for finding the minimum number of colors needed for a proper coloring. Prove that the algorithm is correct (that is, fewer colors would not suffice), and determine the running time of the algorithm.

Request for Solution File

Ask an Expert for Answer!!
Basic Statistics: Endpoints of the intervals
Reference No:- TGS0873967

Expected delivery within 24 Hours