Find maximum nonoverlapping intervals

Given a list of intervals of time, find the set of maximum non-overlapping intervals.

For example,

given following intervals:

[0600, 0830], [0800, 0900], [0900, 1100], [0900, 1130], 
[1030, 1400], [1230, 1400]

Also it is given that time have to be in the range [0000, 2400].

The maximum non-overlapping set of intervals is [0600, 0830], [0900, 1130], [1230, 1400].
Comments (5)