Solution1 xor
A ^ 0 = A
A ^ x ^ x = A
Let res xor every number and index, the only one left is the number without index, which is the number we want.
Last updated
A ^ 0 = A
A ^ x ^ x = A
Let res xor every number and index, the only one left is the number without index, which is the number we want.
Last updated