in reply to overlap between ranges

Simple solution: take all the begin and end points of the ranges. Sort them. Loop over the resulting list. Any time you don't have the end point of range immediately following the begin point of the same range, you have overlap. How to deal with ranges sharing endpoints is left as an exercise to the reader.

In your case, the resulting after sorting is (marking begin points with a capital letter, end points with a lowercase letter)

1(A), 10(a), 11(B), 15(C), 20(b), 21(D), 25(c), 25(E), 30(d), 35(e).
So, c overlaps b, d overlaps c, e overlaps d, and whether e overlaps c is something you'll have to further specify.