Two sum (sorted)
Find two values that add up to a target, walking in from both ends.
Values1, 3, 4, 6, 8, 11, 14, 17sum 19
Find two values in 1, 3, 4, 6, 8, 11, 14, 17 that add up to 19. Start l at the left end and r at the right.
- compare
- swap or write
- settled
Space play · ← → step · Home End jump · drag the strip to scrub