Given an array A and an integer target, find the indices of the two numbers in the array whose sum is equal to the given target.
Note: The problem has exactly one solution. Do not use the same element twice.
A: [1, 3, 3, 4]
target: 5
Answer: [0, 3]
The first line contains an integer ‘T’ denoting the number of test cases.
For each test case, the input has three lines:
For each test case, the output has two space-separated integers ‘i’ and ‘j’ denoting the indices of the array.
2
6
8 2 10 4 1 3
9
5
2 4 2 3 2
7
0 4
1 3
1 <= T <= 10
2 <= n <= 105
-109 <= Ai <= 109
-109 <= target <= 109