python 代码
class Solution(object):
def findKthToTail(self, pListHead, k):
"""
:type pListHead: ListNode
:type k: int
:rtype: ListNode
"""
c = 0
cur = pListHead
while cur:
c+=1
cur = cur.next
if k>c:
return None
cur = pListHead
while c>k:
cur = cur.next
c-=1
return cur