Problem 167 · Medium

Two Sum II - Input Array Is Sorted

Two pointers from both ends: move left if sum too small, right if too large.

Open the interactive visualisation