Swap Two Numbers Without Using Third Variable
Given two variables a and y, swap two variables without using a third variable. Examples: Input: a = 2, b = 3Output: a = 3, b = 2Input: a = 20, b = 0Output: a = 0, b = 20Input: a = 10, b = 10Output: a = 10, b = 10Table of ContentUsing Arithmetic OperatorsUsing Bitwise XORBuilt-in SwapUsing Arithmeti