Question: Given an unsorted array of positive integers, is it possible to find a pair of integers from that array that sum up to a given sum?
Constraints: This shou
def pair_sum(arr,k): counter = 0 lookup = set() for num in arr: if k-num in lookup: counter+=1 else: lookup.add(num) return counter pass pair_sum([1,3,2,2],4)
The solution in python