Can you explain the concept clearly? Not a good explanation. Please explain a shorter solution.
Didn't understand clearly the unique number 2 concept
hello @keshavthakur676
firstly take xor of all the values of the array.
now finalxor= xor of those two different values which have occured only once
these two values are diferent so they will differ in at most one bit.
it means that finalxor will have at least one set bit.
find the place of the left most set bit of the finalxor.
now take xor of all the numbers in the array with that one set bit .
the numbers that have appeared twice wont afffect the xor but one of the different numbers will be included in the final xor.
1 Like
Thanks for the clarification.I found my mistake while understanding the concept.