We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
for sock in ar:
drawer[sock] = drawer.get(sock, 0) + 1
single_pair = sum(1 if x % 2 != 0 else 0 for x in drawer.values())
matching_pair = int((len(ar) - single_pair)/2)
return matching_pair
Cookie support is required to access HackerRank
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 →