Question: This is a problem solving exercise that a certain major software corporation likes to use in their interviews. Like many algorithm design problems, there are many possible answers, but I have presented one of the more generally accepted ones.
A stream of integers between 1 and 1 million is received by a computer. The numbers arrive in random order, however each number only appears once in the sequence. How would you determine which one number was missing from the sequence?