x ^= y //shorthand x = x ^ y
//this is pseudo code [3,4,5,4,3] //array with a single unique value let x=0 // we will use this to handle our values //loop over every element x^=3 //3 x^=4 //7 x^=5 //2 x^=4 //6 x^=3 //3 x is 5
Looping through the array we found the single unique value. The above won’t make sense in base10, you have to do it in binary if you want to make sense of it. Otherwise that is how to do it.