class Solution { public: ListNode* FindKthToTail(ListNode* pListHead, unsigned int k) { if(pListHead == NULL) return NULL; ListNode * p = pListHead, * q = pListHead; for(int i = 0; i < k && p != NULL; ++i){ p = p->next; if(i < k - 1 && p == NULL) return NULL; } while(p != NULL){ p = p->next; q = q->next; } return q; } };