Paired Sum in a Sorted Array

L3 Easy Two Pointers
Concept
When an array is already sorted, two pointers — one at each end — can find a pair that hits a sum in a single pass, without a dictionary.
You are given an array of integers numbers, sorted in non-decreasing order, and a target. Exactly two different entries add up to target. Return their 1-based positions (starting at 1) as a two-element array, in any order. You may not reuse the same index twice.
Examples
▸ numbers = [2, 7, 11, 15], target = 9
→ [1, 2]
▸ numbers = [2, 3, 4], target = 6
→ [1, 3]
▸ numbers = [-1, 0], target = -1
→ [1, 2]
Progressive Hints
Hint 1 · Nudge
Sorted order means you can steer the two ends toward the target instead of checking blindly.
Hint 2 · Plan
Put one pointer at the start and one at the end. Sum the two values; if it equals target, return their 1-based positions. If the sum is too small, move the left pointer right; if too large, move the right pointer left.
Hint 3 · Approach
left = 0, right = last index. While left < right: if numbers[left] + numbers[right] == target, return [left + 1, right + 1]. If the sum is too small, left = left + 1; else right = right - 1.
Output
// Run your code to see the output here.