Two Pointers
Two Pointers — Pair Sum
Move two pointers inward on a sorted array to find a target sum.
target
Start — L=0, R=7, target=14
L
1
03
14
26
38
411
515
6R
20
7sum = 21 · target = 14
Step 0/8
Two Pointers
Move two pointers inward on a sorted array to find a target sum.