You are viewing a single comment's thread. Return to all comments →
def pairs(k, arr): s1 = set(arr) s2 = set(i + k for i in s1) return len(s1 & s2)
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 →