Two Sum II - Input Array Is Sorted
Find two numbers that add up to a specific target number in a sorted array. Return 1-based indices.
Two Sum II - Input Array Is Sorted

Find two numbers that add up to a specific target number in a sorted array. Return 1-based indices.

Example 1:
Input: {"numbers":[2,7,11,15],"target":9}
Output: [1,2]
Input
arr ={"numbers":[2,7,11,15],"target":9}
Target

9

vs

Current Sum (L+R)

?

2

L

1

7

2

11

3

15

R

4

Variables
VariableValue
l0
r3
DepthFunction Call
Stack empty
0/11