Find two numbers in a sorted array that add up to a target.
Input Format
Integer n n space-separated sorted integers Target integer
Output Format
Indices (1-based) or -1
Sample Input
5 1 2 3 4 5 9
Sample Output
4 5
Find two numbers in a sorted array that add up to a target.
Integer n n space-separated sorted integers Target integer
Indices (1-based) or -1
5 1 2 3 4 5 9
4 5