title: Find Range of a number from an array
body: <p>I'm just rephrasing the <a href="https://stackoverflow.com/questions/3519901/get-values-for-keys-within-a-range-in-java">question</a> I asked a little while ago.
  I have a sorted array <code>{2.0,7.8,9.0,10.5,12.3}</code></p>
  
  <p>If I given an input 9.5
  What is the fastest way to find 9.0 and 10.5 to indicate that 9.5 is in between 9.0 and 10.5 (9.5 >=9.0 and &lt;10.5) ?
  Is binary search an option?But since the input need not be in the array.I'm not sure how I should do this.</p>
  
  <p>Also If there is any other data structure that is suitable please comment. </p>