Swap nodes at postion k from starting and end