LintCode 166.鏈表倒數第n個節點

思路 先求鏈表的長度 算出待求節點正序位置 再次遍歷求值 /** * Definition of ListNode * class ListNode { * public: * int val; * ListNode *next; * ListNode(int val) { * this->val = val; * this->next = NULL; * } * } */ class Solut
相關文章
相關標籤/搜索