Swap

Java

With Temp Var

Without Temp Var

Using Bitwise Operator

Python

With Temp Var

Without Temp Var

Using Bitwise Operator