solve the swap Nodes in pairs