Skip to content

Instantly share code, notes, and snippets.

@deyindra
Created March 26, 2016 03:28
Show Gist options
  • Save deyindra/a91077ed84222917920c to your computer and use it in GitHub Desktop.
Save deyindra/a91077ed84222917920c to your computer and use it in GitHub Desktop.
Find the odd One
public int findOddOne(int[] array){
int xor = array[0];
for(int i=1;i<array.length;i++){
xor = xor ^ array[i];
}
return xor;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment