• + 0 comments

    python is magic :)

    def sockMerchant(arr):
        return sum([x//2 for x in list(Counter(arr).values())])