find pair on given sum in sorted array in O(n)
Anonymous
2 indexes, one from the start and one from the end. and sum them up, if the sum is larger decrement the index and if bigger increment the index.
Check out your Company Bowl for anonymous work chats.