Problem
Leaderboard

Problem: N-Repeated Element in Size 2N Array

Statement

You are given an integer array nums of length 2×n2 \times n. The array contains exactly n+1n + 1 unique values. Of these unique values, nn of them appear exactly once, and the remaining one appears exactly nn times.

Return the element that is repeated nn times.

Constraints:

  • 22 \leq n 5000\leq 5000

  • nums.length ==2×== 2 \times n

  • 00 \leq nums[i] 104\leq 10^4

  • nums contains n+1n + 1 unique elements, and exactly one of them is repeated nn times

Problem
Leaderboard

Problem: N-Repeated Element in Size 2N Array

Statement

You are given an integer array nums of length 2×n2 \times n. The array contains exactly n+1n + 1 unique values. Of these unique values, nn of them appear exactly once, and the remaining one appears exactly nn times.

Return the element that is repeated nn times.

Constraints:

  • 22 \leq n 5000\leq 5000

  • nums.length ==2×== 2 \times n

  • 00 \leq nums[i] 104\leq 10^4

  • nums contains n+1n + 1 unique elements, and exactly one of them is repeated nn times