Open fly0o0 opened 4 years ago
136. 只出现一次的数字
/** * @param {number[]} nums * @return {number} */ var singleNumber = function(nums) { let single = 0 for (let n of nums) { single ^= n } return single };