Sir,why was it necessary to create a variable named ‘temp’ which stored the result of ‘xor’ of all the numbers(or we can say ‘xor’ of unique numbers)?
Doubt I The Code
hello @mehul.jain2k
we are using temp variable to compute first set bit position.
if we use xor in place of temp then we cannot retrieve other pair , becuase to retrieve other pair we need xor value which is changed now by for loop.