You are viewing a single comment's thread. Return to all comments →
Python 3 Solution:
def sockMerchant(n, ar): dic_stocks = {} count = 0 for x in ar: if x in dic_stocks: dic_stocks[x] += 1 else: dic_stocks[x] = 1 for x in dic_stocks: count += dic_stocks[x] // 2 return count
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 →
Python 3 Solution: