查找单链表的倒数第k个节点,要求只能遍历一次链表(C语言)

PSListNode FindLastKNode(PSListNode pHead, int K) { if ((NULL == pHead) || (K <= 0)) { return NULL; } else { PSListNode pFast = pHead; PSListNode pSlow = pH
相关文章
相关标签/搜索