You are given an integer array nums of length 2×n. The array contains exactly n+1 unique values. Of these unique values, n of them appear exactly once, and the remaining one appears exactly n times.
Return the element that is repeated n times.
Constraints: