> Application 1: In-Place Swapping Warning: if x == y, then instead of swapping, the two values are set to zero. So this swapping trick works only for x!=y. --------- The other tricks are interesting, and likely hold the key to some kind of parallel programming trick, as a sequence of XORs is trivially parallelizable through the prefix-sum pattern. All of the other tricks are O(n) number of XOR operations, while para…
This one-liner works for x==y: x ^= y ^ (y = x); Is this really code, or some kind of new text emojis? :)