has pair with sum
def hasPairWithSum(arr, s):
# create a dictionary / set which contains the value of the sum - arr[i]
findSet = set()
for i in arr:
if i in findSet:
return True
else:
findSet.add(s-i)
return False
a = hasPairWithSum([1,5,4,5], null)
print(a)
INFO