Given a sorted array, check if there exist two numbers whose sum is zero.
A: [-3, 1, 3, 4]
Answer: true
A: [-2, 1, 3, 4]
Answer: false
The first line contains an integer âTâ denoting the number of test cases.
For each test case, the input has two lines:
For each test case, the output has true or false denoting the answer.
2
4
-3 1 3 4
4
-2 1 3 4
true
false
1 <= T <= 100
2 <= n <= 104
-107 <= Ai <= 107