topic description
given a sequence containing n numbers of 0, 1, 2,., n, find 0. The number in n that does not appear in the sequence.
related codes
var missingNumber = function(nums) {
var res = nums.length;
for(var i = 0; i < nums.length; iPP){
res = res^(i ^ nums[i]);
}
return res;
};
see a great god"s answer, but do not quite understand the meaning of res = res ^ (I ^ nums [I]);
, check the explanation of ^, debug the program, still do not quite understand how to compare it, please answer, thank you