Update SwapNodesinPairs.cpp