Code

Code

Swap using XOR algorithm in C# Raw


// http://en.wikipedia.org/wiki/XOR_swap_algorithm
private void Swap(ref int x, ref int y)
{
    x ^= y;
    y ^= x;
    x ^= y;
}


라벨: