Posted by: Mr. D December 12, 2014
Adults ONLY !
Login in to Rate this Post:     0       ?        
Add all the numbers in the array.
Then find n! ( that is 1,000,000!)
Subtract them, that would be number that is missing.

This is would be complete in O(n) which is better than sorting the number and then using one of above algorithm to find the missing one.
Read Full Discussion Thread for this article