As with all standard questions the solution is to google them before the interview.
This question and variations have a very definite 'correct' answer involving XORing all the numbers. Its supposed to show you understand indexes in databases or something. So zero points for any 'might work but not what it says on the paper' answer im afriad.
On the plus side there is a finite set of these questions a few hours revision will make you look like a genius. Just remember to pretend you are working it out in your head.
Edit. Ahh it seems for 4 there is a different approach than XOR
Edit. Downvoters : This is a published textbook O(n) solution to the exact problem stated in the OP.