Given n segments of line (in the X axis) with coordinates [Li, Ri]. (-infinity < LiRi < +infinity, i = 0, 1, ..., n) You are to choose the minimal amount of them, such they would completely cover the segment [0, M]. Design an efficient algorithm for the problem. You can describe your idea before giving the algorithm. Explain why your algorithm is correct. What is the complexity of your algorithm?