Iterate from opposite ends or converging indices to search sorted elements in O(N)
3 standard techniques
Start at both ends; move inward.
Fast reader, slow writer (in-place).
Fix one index; two-sum the rest.