Given a numbers that is already sorted in non decreasing order, find two numbers such that they add up to a specific target number. Let these two numbers be numbers[index1] and numbers[index2] where numbers.length.
Return the indices of the two numbers, index1 and index2, as an integer array [index1, index2] of length
Note: The tests are generated such that there is exactly one solution, and the same element cannot be used twice.
Constraints:
numbers.length
numbers[i]
numbers is sorted in non decreasing order.
target
The tests are generated such that there is exactly one solution.
Given a numbers that is already sorted in non decreasing order, find two numbers such that they add up to a specific target number. Let these two numbers be numbers[index1] and numbers[index2] where numbers.length.
Return the indices of the two numbers, index1 and index2, as an integer array [index1, index2] of length
Note: The tests are generated such that there is exactly one solution, and the same element cannot be used twice.
Constraints:
numbers.length
numbers[i]
numbers is sorted in non decreasing order.
target
The tests are generated such that there is exactly one solution.