3sum, method using hashset