문제 링크 : N-Repeated Element in Size 2N Array
/** * @param {number[]} nums * @return {number} */ var repeatedNTimes = function(nums) { let set = new Set(); for (let n of nums) { if (set.has(n)) return n; set.add(n); } };