You are viewing a single comment's thread. Return to all comments →
def sockMerchant(n, ar): socks = set() pairs = 0 for sock in ar: if sock in socks: pairs += 1 socks.remove(sock) else: socks.add(sock) return pairs
Seems like cookies are disabled on this browser, please enable them to open this website
Sales by Match
You are viewing a single comment's thread. Return to all comments →