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.
defsockMerchant(n,ar):# Write your code herecount={}no_of_pair=0foriinar:ifinotincount:count[i]=1continuecount[i]+=1forkeyincount:ifcount[key]>=2:no_of_pair+=int(count[key]/2)
Sales by Match
You are viewing a single comment's thread. Return to all comments →
Solution in python with O(n):