Find XOR of Numbers Twice
You are given an array nums where each integer in [1, n] appears exactly once or twice, and nums.length = 2n. Return the XOR of all numbers that appear exactly twice.
You are given an array nums where each integer in [1, n] appears exactly once or twice, and nums.length = 2n. Return the XOR of all numbers that appear exactly twice.