What is the optimal algorithm for finding all sets of overlapping ranges?
Sort the ranges by their start points. Then your overlapping ranges can be found in $O(k + n)$ where $k$ is the number of overlapping pairs and $n$ is the input size simply by a double loop. In C:

int i, j;
for (i = 0; i &lt; n; ++i) {
    int start = start_points[i];
    for (j = i + 1; j &lt; n &amp;&amp; start_points[j] &lt; end_points[i]; ++j) {
        output(i, j);
    }
}