title: Union of intervals
body: <p>I've got a class representing an interval. This class has two properties "start" and "end" of a comparable type. Now I'm searching for an efficient algorithm to take the union of a set of such intervals.</p>
  
  <p>Thanks in advance. </p>