Swap given two numbers and print them. (Try to do it without a temporary variable.) and return it.
Input: a = 13, b = 9 Output: 9 13 Explanation: after swapping it becomes 9 and 13.
Input: a = 15, b = 8 Output: 8 15 Explanation: after swapping it becomes 8 and 15.
You don't need to read input or print anything. Your task is to complete the function get() which takes a, b as inputs and returns the list of integers contains the new value of a and b after swap.
Expected Time Complexity: O(1)
Expected Auxiliary Space: O(1)
1 ≤ a, b ≤ 106
We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?Yes