3 ms·
So a good example of this in code would be: a = a xor b; b = a xor b; a = a xor b; In this case it is a technique for swapping two variables without using
by derekp7 9y ago
So a good example of this in code would be:
a = a xor b; b = a xor b; a = a xor b;
In this case it is a technique for swapping two variables without using a third variable. But it really serves no efficiency purpose in most applications (however it is fun to use).