Recursion and swap without the help of temp