How to store intervals and lookup interval by value?
<p>I have a list which have three objects suppose name it as data.</p>

<ol>
<li>data[0] has 0-6</li>
<li>data[1] has 6-13</li>
<li>data[2] has 13-23</li>
</ol>

<p>I have a method and it has two arguments one is <code>starttime</code> and another is <code>endtime</code>.
My requirement is if the input values are in between the first object then this method will return the first object. If the input values are in between the first two objects then the method should return the first two objects. How can I do this. Can any one tell me?</p>
