• + 0 comments

    python code:

    `

    def sockMerchant(n, ar): # Write your code here di={} ct=0 for i in ar: if i in di.keys(): di[i]+=1 else : di[i]=1
    for i in di: ct+=di[i]//2
    return ct