You are given an array numbers that is already sorted in non-decreasing order, and its positions start from 1. Find two numbers in it that add up to target. Let their positions be index1 and index2, with 1 <= index1 < index2 <= numbers.length.
Return [index1, index2]. Remember that the positions start from 1.
The tests have exactly one answer. You may not use the same element twice. Use only constant extra memory.
Examples
Example 1:
Input: numbers = [1,3,4,8,11], target = 15
Output: [3,5]
Explanation: 4 + 11 = 15. 4 is at position 3 and 11 is at position 5.
Example 2:
Input: numbers = [2,5,5,9], target = 10
Output: [2,3]
Explanation: The two 5s are two different elements: positions 2 and 3.
Example 3:
Input: numbers = [-4,-1,0,6], target = -5
Output: [1,2]
Explanation: -4 + -1 = -5, at positions 1 and 2.