https://leetcode-cn.com/problems/lian-biao-zhong-dao-shu-di-kge-jie-dian-lcof/
func getKthFromEnd(_ head: ListNode?, _ k: Int) -> ListNode? {
let dummy = ListNode(0)
dummy.next = head
var first = dummy
var second = dummy
var n = k
//当前first停留在位置下标(k-1)上
while n > 0 {
first = first.next!
n = n - 1
}
//继续遍历first,直至nil,此时second停留位置以后的节点即为倒数k个节点
while first.next != nil {
first = first.next!
second = second.next!
}
return second.next
}