Given two integers a and b, return them swapped as an array [b, a] using XOR bit manipulation. Do not use a temporary variable.
For example, given a = 3 and b = 5, return [5, 3].
a = 3, b = 5[5, 3]a = 10, b = 20[20, 10]a = 0, b = 7[7, 0]-10^9 <= a, b <= 10^9Run your code to see results
Use Cmd+Enter to run