Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Input Format
An integer number n represents size of array
N integer number representing elements of array.
An integer number k represents target.
Constraints
1 <= arr.length <= 100000
-1000000 <= arr[i] <= 1000000
-1000000 <= target <= 1000000
Output Format
All required pairs are in different lines.
Sample Input 0
4
2 7 11 15
9
Sample Output 0
0 1
Explanation 0
Because nums[0] + nums[1] == 9, we return [0, 1].
ALSO READ: Java Full Stack Developer vacancy in COGNIZANT