Login
From:
danangell.com
(Uncensored)
subscribe
XOR Swap Explained Visually - danangell.com/blog
https://danangell.com/blog/posts/xor-swap-explained-visually/
links
backlinks
Roast topics
Find topics
Find it!
A common riddle-like question for programmers asks them to swap the values of two integers without a temporary intermediate value. There are two common solutions that I’m aware of, addition swap and XOR swap. Here’s what each looks like in C: