Two sum code

find all the pairs in the array that sum up to a number