You are viewing a single comment's thread. Return to all comments →
Python 1 liner: O(N)
return sum(map(lambda v: v // 2, Counter(ar).values()))
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 1 liner: O(N)