title: How to find all overlapping ranges and partition them into chunks?
body: <p>I have an array of ranges and I want to be able to find all the overlapping ranges:</p>
  
  <h3>For example:</h3>
  
  <pre><code>var examples = [
      // Group 1
      {start: 9, end: 10.50},       // Range 1
      {start: 10, end: 10.50},      // Range 5
  
      // Group 2
      {start: 11, end: 13},         // Range 2
      {start: 13.5, end: 14.5},     // Range 3
      {start: 11.5, end: 14}        // Range 4
  ]
  </code></pre>
  
  <ol>
  <li>Range 2 overlaps with Range 4</li>
  <li>Range 3 overlaps with Range 4</li>
  <li>Although Range 2 does not overlap with Range 3, because they both overlap with Range 4. They will be put into the same group</li>
  <li>Range 1 and Range 5 only overlap with each other and so they will be in their own group</li>
  </ol>
  
  <h3>JSFiddle here:</h3>
  
  <p><a href="http://jsfiddle.net/jukufon7/2/" rel="nofollow">http://jsfiddle.net/jukufon7/2/</a></p>