XOR facts

If you XOR a number even times by itself, you will end up with zero
but if you do it odd times, you will be getting the number itself.
This logic can be used in many different problems, e.g. finding the odd and even number of times a number occurs and so on.

Leave a Reply

Your email address will not be published. Required fields are marked *