leetcode-445-兩數相加II

  //與倒序不同,如果程序一開始沒有reverse l1,不能直接返回l1,因爲其依然指向原頭結點,即現尾節點 class Solution { public:     ListNode* reverseListNode(ListNode* head) {         ListNode* preNode = NULL;         ListNode* curNode = head;   
相關文章
相關標籤/搜索