Opposite ends
O(n)Start one pointer at each end. Look at the pair, decide which end can never be part of the answer, and move it inwards.
Reach for it when the input is sorted or symmetric, and you are looking for a pair or comparing the ends.Go deeper: Two pointers: walking an array from both ends