Y
Hacker News
new
|
ask
|
show
|
jobs
by
praptak
64 days 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.
1 comments
imploded_sub
64 days ago
TFA mentions this as an issue for the trick, whereas you rightly point out it's an evil feature instead.
link