Update swapNodePairs.cpp