Use a hash map to store numbers you've seen. For each number , compute the complement and check if it's in the map.
If the complement exists, you found your pair. If not, add the current number to the map and continue.
This takes time with space. The brute force approach (checking all pairs) would take .