O(nlogn) solution to 2SUM