TheAlgorithms-C/leetcode/src/136.c

8 lines
158 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++)
2019-08-25 01:08:45 +08:00
result = result ^ nums[i];
return result;
}