title: At what point does binary search become more efficient than sequential search?
body: <p>I've been learning a lot about algorithms lately, and the binary searched is hailed for its efficiency in finding an item in large amounts of <strong>sorted</strong> data. But what if the data is not sorted to begin with? at what points does a binary search provide an efficiency boost against sequential search, with binary search having to sort the given array first off THEN search. I'm interested in seeing at what points binary search passes over sequential search, if anyone has tested this before i would love to see some results.</p>
  
  <p>Given an array foo[BUFF] with 14 elements</p>
  
  <pre><code>1 3 6 3 1 87 56 -2 4 61 4 9 81 7
  </code></pre>
  
  <p>I would assume a sequential sort would be more efficient to find a given number, let's say... 3, because binary search would need to first sort the array <strong>THEN</strong> search for the number 3. BUT:</p>
  
  <p>Given an array bar[BUFF] with one thousand elements held</p>
  
  <pre><code>1 2 4 9 -2 3 8 9 4 12 4 56 //continued
  </code></pre>
  
  <p>A call to sort then binary search should in theory be more efficiently if i am not mistaken.</p>