title: Binary search - worst/avg case
body: <p>I'm finding it difficult to understand why/how the worst and average case for searching for a key in an array/list using binary search is O(log(n)).</p>
  
  <p>log(1,000,000) is only 6. log(1,000,000,000) is only 9 - I get that, but I don't understand the explanation. If one did not test it, how do we know that the avg/worst case is actually log(n)? </p>
  
  <p>I hope you guys understand what I'm trying to say. If not, please let me know and I'll try to explain it differently. </p>