title: How to find if a point is within a set of intervals?
body: <p>I am looking for the fastest way to decide whether or not a point on a line is within a subset of this line.
  I am given an integer Point, and I also have a "list" of either:</p>
  
  <ol>
  <li>Points, represented by an integer ( 3, 10, 1000, etc)</li>
  <li>Intervals, that I represent by 2 integers ( 2:10 is all integers from 2 to 10 inluded, 50:60, etc)</li>
  </ol>
  
  <p>In this example, if the value of my point is 5, then I return true because it is included in an interval, same for 55. If my point is equal to 1000, I also return true because it matches the list of points.</p>
  
  <p>I am looking for a fast way (quicker than linear) to check for this condition, WITHOUT having to instanciate as many integer as there are possible points (ie, for a 1:1000 interval I don't want to instanciate 1000 integers).
  Can this be done in a logarithmic time?</p>
  
  <p>Thanks</p>
  
  <p>edit : 
  you can consider that any time taken to pre-process the list of data is equal to 0, because once my initial intervals are processed I need to apply this test to 10k points</p>