We find two elements in an array of 100000 elements, which are subtracted coming to 0.

We find two elements in an array of 100000 elements, which are subtracted coming to 0.
example:
Input:
-99 -2 -1 4 98
Output
-1
-----------------------------------------------------------
Input
-100 -2 -1 103
Output
-3
-----------------------------------------------------------
Input
-8 -4 4 8
Ouput
0
What is the question?
You'll need two loops -- an outer and an inner.
? Whats your code. The number is coming to 0.

Topic archived. No new replies allowed.