[add new method][Q17.1]replace two numbers in-place