Code AnalysisIntermediate 45s
Trace: Two Pointers
In sorted array [1, 2, 3, 4, 5], which pair sums to 6 using two pointers?
L=0(val=1), R=4(val=5): 1+5=6 → found!
Starter code
// Array: [1, 2, 3, 4, 5], target=6 // L=0 (val=1), R=4 (val=5), sum=6 → found
Think you can answer under pressure?
Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.