Update swapNodesInPairs.cpp