two sum O(n^2) solution