# Programming Task: Find two unique numbers in an array of $10,000,000$ [closed]

Can anybody help with this? This problem have to be solved using programming language Java or C++. (Or just advice algorithm).

Task: We have $N$ ($N \le 10, 000, 000$) numbers in range from $-1,000,000,000$ to $1 ,000 ,000 ,000$. Most have a duplicate, but two are unique. We have to find the two unique numbers.

Input:
$N$ Numbers, delimited with space char

Output: The two unique numbers

Examples:

Input:

6
4 8 4 7 9 9


Output:

7 8


Input:

8
7 7 5 5 5 5 5 6


Output:

5 6

-

## closed as unclear what you're asking by Clive Newstead, Matt Pressland, Raskolnikov, Zander, O.L.Jul 4 '13 at 14:37

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

I've voted to close because it's unclear what is being asked here. –  Clive Newstead Jul 4 '13 at 14:15
How's 5 unique in the second example? –  Raskolnikov Jul 4 '13 at 14:24
You can find a good solution here: shamasis.net/2009/09/… –  vadim123 Jul 4 '13 at 14:35
@vadim123 This is a contest question, not a programming one. There is a nice $O(N)$ solution, but I will not post it here, unless the OP states the context of his question, so that I know it is not cheating. –  dtldarek Jul 4 '13 at 15:45