标签:tle turn 14. while scribe nbsp class title 思路
class Solution { public: ListNode *FindKthToTail(ListNode *pListHead, unsigned int k) { if (pListHead == NULL) return NULL; ListNode *low = pListHead; ListNode *high = pListHead; for (int i = 0; i < k - 1; i++) { if (high->next == NULL) return NULL; high = high->next; } while (high->next != NULL) { high = high->next; low = low->next; } return low; } };
标签:tle turn 14. while scribe nbsp class title 思路
原文地址:https://www.cnblogs.com/ruoh3kou/p/10050781.html