查找單鏈表的倒數第k個節點,要求只能遍歷一次鏈表(C語言)

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