find pairs in array which match a sum