Explain about the approach to solve the problem

Please guide me to solve this problem

@prateekad99,

  • If we take XOR of zero and some number, it will return that number: a xor 0 = a
  • If we take XOR of two same numbers, it will return 0: a xor a=0
  • a xor b xor a = (a xor a) xor b = 0 xor b = b
    So we can XOR all numbers together to find the unique number.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.