O(n^2 logn) solution to 3SUM