3 ms·
Swap two variables using XOR: x ^= y; y ^= x; x ^= y; Check if the number is even: x & 1 == 0
by andreygrehov 4y ago
Swap two variables using XOR:
x ^= y;
y ^= x;
x ^= y;
Check if the number is even:
x & 1 == 0
- eps 4y ago... unless x and y are the same.