4 ms·
Xor swap trick has perfect profile for underhanded C contests. It generally works until a specific condition triggers its failure. The condition is "the argumen
by praptak 6mo ago
Xor swap trick has perfect profile for underhanded C contests. It generally works until a specific condition triggers its failure. The condition is "the arguments are aliases", so for example XOR_SWAP(a[i], a[j]) when i=j.
- imploded_sub 6mo agoTFA mentions this as an issue for the trick, whereas you rightly point out it's an evil feature instead.