careercup / CtCI-6th-Edition

Cracking the Coding Interview 6th Ed. Solutions
11.33k stars 4.41k forks source link

Update Q16_01_Number_Swapper. #203

Open tirtharajghosh opened 4 years ago

tirtharajghosh commented 4 years ago

Added a simpler solution i.e. swap_opt2 function to solve the same problem. In single line, without any third variable, I have solved the problem.