Update swap-nodes-in-pairs.cpp

how did you think of this?
and how can i comment on your code without changing it?