Swapping kth element in a linked list.