【面试真题】给定长度为n的数组,内部有n-2个整数出现了偶数次,和2个只出现奇数次的整数,找到这两个数
/* This finction sets the values of *x and *y to nonr-epeating
elements in an array arr[] of size n*/
void get2NonRepeatingNos(int arr[], int n, int *x, int *y)
{
int xor = arr[0]; /* Will hold ...
原创
2019-03-22 19:51:24 ·
580 阅读 ·
0 评论