In this solution even test cases won’t give the result as expected for the unique number?
Even test cases
what if i give 4 cases
my inputs are 10 12 10 8 ,ok
now wat is unique number here , the code will give me a number =12^8 … but the number is not included in the input…
explain?
It’s already mentioned that there is only unique number in given test cases.
It says there are 2n+1 numbers where every number occurs even number of times except one.
This particular xor trick is supposed to work only on such test cases. Not on a testcase that you have given.
understood thankyou …
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.