IN this question finding unique number 3 in which array given in which one number are diffrent and three numbers are same if we use bits manipulation then it gives answer correctly for positive numbers not a negative number …why…
like a[]]={1,1,1,2,3,3,3,},output =2…
Please ex pl ain
@AMIT_KUMAR it gives wrong output only if the unique number is negative, not if any other number is negative. It might have something to do with the way negative numbers are stored in memory, which results in wrong answer.
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.