DEV Community

Discussion on: swapping in one line

Collapse
 
pykashchain profile image
Pykash

yeah but we have to do need inline swapping statement so is it best.

Collapse
 
curtisfenner profile image
Curtis Fenner

The code you have shared in the post is wrong for multiple reasons, as outlined above. As a result, it doesn't even solve the problem, let alone be the best solution.

Thread Thread
 
pykashchain profile image
Pykash

may be but According to placement or viva exam Interview may ask online statement swapping statement.