added the code to swap the kth value from start with the end but not the node