2-sum problem with hashtable