2 ms·
I know a common one is how to switch the values of two variables without using a temporary third variable. One way (method 2 here [1]) is to use repeated bitwis
by SilasX 10y ago
I know a common one is how to switch the values of two variables without using a temporary third variable. One way (method 2 here [1]) is to use repeated bitwise XORs.
Does that sound like it could be the one?
[1] http://www.geeksforgeeks.org/swap-two-numbers-without-using-temporary-variable/ http://www.geeksforgeeks.org/swap-two-numbers-without-using-...