title: Finding array keys between two key values
body: <p>I have an array where the keys are timestamps, and the values are ids.</p>
  
  <p>For example:</p>
  
  <pre><code>[11111111] =&gt; 11
  
  [12345678] =&gt; 21
  
  [12345679] =&gt; 4
  
  [12345688] =&gt; 2
  
  [22222222] =&gt; 1
  </code></pre>
  
  <p>If I had two timestamps, like 12345677 and 12345689 for example, what would be the most effective way of finding the items that have keys between those two values?  For the example the items returned would be 21, 4, and 2, but I am working with a large data set (200000 plus items) so it will have to be efficient.</p>