Given a 1-indexed array of integers numbers sorted in non-decreasing order, find two numbers that add up to a specific target number.
Return the indices of the two numbers as a 1-indexed array of length 2.
Examples
Input: numbers = [2,7,11,15], target = 9 Output: [1,2]
Input: numbers = [2,3,4], target = 6 Output: [1,3]
Constraints
- 2 <= numbers.length <= 30,000
- -1,000 <= numbers[i], target <= 1,000
- Exactly one solution exists.