struct ListNode{
int data;
ListNode *next;
};
ListNode* KthToTail(ListNode *pHead,int k){
if(pHead==NULL||k<=0) return NULL;
ListNode *pAhead=pHead;
ListNode *pBehind=pHead;
for(int i=0;i<k-1;++i){
if(pAhead->next!=NULL){
pAhead=pAhead->next;
}
else return NULL;
}
while(pAhead->next){
pAhead=pAhead->next;
pBehind=pBehind->next;
}
return pBehind;
}