Given a set of points on the line in increasing order, cover all the points with a minimal number of intervals of length 1. For example, if the points are 0.6, 0.8, 1.7, and 2.3, then intervals [0.5, 1.5] and [1.7, 2.7] form an optimal solution. Give an O(n) greedy algorithm for finding an optimal solution for this problem.