You are viewing a single comment's thread. Return to all comments →
from collections import Counter
def sockMerchant(n, ar):
count = Counter(ar) res = 0 val = list(count.values()) for i in val: if i >= 2: res += i//2 return res
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 →
from collections import Counter
def sockMerchant(n, ar):