You are given an integer array nums with the following properties:


	nums.length == 2 * n.
	nums contains n + 1 unique elements.
	Exactly one element of nums is repeated n times.


Return the element that is repeated n times.

&nbsp;
Example 1:
Input: nums = [1,2,3,3]
Output: 3
Example 2:
Input: nums = [2,1,2,5,3,2]
Output: 2
Example 3:
Input: nums = [5,1,5,2,5,3,5,4]
Output: 5

&nbsp;
Constraints:


	2 &lt;= n &lt;= 5000
	nums.length == 2 * n
	0 &lt;= nums[i] &lt;= 104
	nums contains n + 1 unique elements and one of them is repeated exactly n times.


class Solution:
    def repeatedNTimes(self, nums: List[int]) -> int:
        return Counter(nums).most_common(1)[0][0]
class Solution {
    public int repeatedNTimes(int[] nums) {
        int count = 0;
        for(int i = 0; i < nums.length; i++) {
            for(int j = i + 1; j < nums.length; j++) {
                if(nums[i] == nums[j])
                    count = nums[j];
            }
        }
        return count;
    }
}
class Solution {
public:
    int repeatedNTimes(vector<int>& nums) {
        unordered_map<int, int> mp;
        for(auto it : nums) mp[it]++;
        int n;
        for(auto it : mp) {
            if(it.second == nums.size() / 2) {
                n = it.first;
                break;
            }
        }
        return n;
    }
};
var repeatedNTimes = function(nums) {

//   loop through the array and then as we go over every num we filter that number and get the length. If the length is equal to 1 that is not the element so we continue if its not equal to one its the element we want and we just return that element. 

  for (let num of nums) {
    let len = nums.filter(element => element === num).length
    if (len == 1) continue;
    else return num
  }

};
N-Repeated Element in Size 2N Array