


Given two variables βXβ and βYβ. Your task is to swap the number without using a temporary variable or third variable.
Swap means the value of βXβ and βYβ must be interchanged. Take an example βXβ is 10 and βYβ is 20 so your function must return βXβ as a 20 and βYβ as a 10.
The first line of input contains an integer βTβ denoting the number of test cases.
Next βTβ lines contain two space-separated integers βXβ and βYβ which represent the next βTβ test cases.
Output Format
For each test case, return an array/vector that contains two integers βXβ and βYβ with a swapped value.
Note :
You do not need to print anything, it has already been taken care of. Just implement the given function.
1 <= T <= 2*10^5
-10^9 <= X,Y <= 10^9
Where βTβ is the total number of test cases, βXβ and βYβ denotes two given integer variables.
Time limit: 1 second
2
10 12
-4 -5
12 10
-5 -4
Test Case 1:
Given βXβ is 10 and βYβ is 12. After swapping βXβ will be 12 and βYβ will be 10.
Test Case 2:
Given βXβ is -1 and βYβ is -5. After swapping βXβ will be -5 and βYβ will be -4.
2
1 2
0 -5
2 1
-5 0
Try with arithmetic operations (addition and subtraction)
O(1), We are taking only constant time
O(1), We are using constant space