Purpose is not clear since the code does not appear to use anything other than the explicit endpoints.
Also, intervals are indexed by LEFT/RIGHT rather than START/STOP. Values may be the same, but the former is a whole lot more mnemonic. https://codereview.appspot.com/571980043/
