title: How to find array elements that fall in a given interval?
body: <p>This is an interview question. </p>
  
  <p>Given an array of integers and a <em>stream</em> of intervals (pairs of integers) find the elements of the array that fall in each interval of the stream. What array pre-processing would you use?    </p>