You are viewing a single comment's thread. Return to all comments →
def pairs(k, arr): # Write your code here temp = set(arr) count = 0 for i in range(len(arr)): diff = arr[i] - k if diff in temp: count += 1 return count
Seems like cookies are disabled on this browser, please enable them to open this website
Pairs
You are viewing a single comment's thread. Return to all comments →