TheAlgorithms-C/leetcode/src/136.c

7 lines
150 B
C
Raw Normal View History

int singleNumber(int *nums, int numsSize)
{
2019-08-25 01:08:45 +08:00
int i, result = 0;
for (i = 0; i < numsSize; i++) result = result ^ nums[i];
2019-08-25 01:08:45 +08:00
return result;
}