code: def interval_cover(I):
      
      S = []
      for start, end in sorted(I, key=lambda v: v[1]):
          if not S or S[-1] < start:
              S.append(end)
      return S
docs: Minimum interval cover
  
      :param I: list of closed intervals
      :returns: minimum list of points covering all intervals
      :complexity: O(n log n)