https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/description/?envType=study-plan-v2&envId=top-interview-150

class Solution {
public:
    vector<int> twoSum(vector<int>& numbers, int target) {
        int l = 0, r = numbers.size() - 1;
        while ((numbers[l] + numbers[r]) != target) {
            if ((numbers[l] + numbers[r]) > target) r -= 1;
            else l += 1;
        }
        return {l + 1, r + 1};
    }
};

Time Complexity: O(n)
Space: O(1)