O(n^2) solution to 3SUM