Leetcode 961. N-Repeated Element in Size 2N Array

送分题

class Solution(object):
    def repeatedNTimes(self, A):
        """
        :type A: List[int]
        :rtype: int
        """
        count=collections.Counter(A)
        for val,num in count.items():
            if num==len(A)/2:
                return val
        
原文地址:https://www.cnblogs.com/zywscq/p/10562582.html