Bit Manipulation
XOR for eliminating paired duplicates
As 0 ^ a = a, a ^ a = 0, XOR can be used to eliminate paired duplicates.
Example: 136-Single Number, 389-Find the Difference.
As 0 ^ a = a, a ^ a = 0, XOR can be used to eliminate paired duplicates.
Example: 136-Single Number, 389-Find the Difference.