Leetcode 1001 Solution

This article provides solution to leetcode question 1001 (n-repeated-element-in-size-2n-array)

https://leetcode.com/problems/n-repeated-element-in-size-2n-array

Solution

class Solution:
    def repeatedNTimes(self, A: List[int]) -> int:
        c = collections.Counter(A)
        return [v for v in c if c[v] > 1][0]