title: Fastest way to find 2 missing numbers in an array
body: <p>This question exist only because of pure curiosity. Not a homework.</p>
  
  <p>Find the fastest way to find two missing number in an array 1..n</p>
  
  <p>So, In a related post: <a href="https://stackoverflow.com/questions/2113795/quickest-way-to-find-missing-number-in-an-array-of-numbers">Quickest way to find missing number in an array of numbers</a>
  I found out that you can do this pretty quickly by summing up and substracting total. </p>
  
  <p>but what about 2 numbers?</p>
  
  <p>So, our options are:</p>
  
  <ol>
  <li>Sequential search  </li>
  <li>Summing up items, substracting from total for all items from 1..n, then searching all possible cases.</li>
  </ol>
  
  <p>Anything else?
  Possible to have O(n) solution?
  I found this in ruby section of one of the websites, but any language is considered (unless there are some specific things for a language) </p>