Optimize a system for finding pairs of numeric values in a list which sum to a specified third value.
Sigiloso
The previous answer seems to assume that all elements are positive. So, intead, create a search structure (by sorting or creating a hash table) and then for each element search for another element that is the difference between the sum and the the given element.