Create swapNodesinPairs.cpp