leetcode141_重排鏈表

一.迭代數組 1. 將鏈表轉換爲數組,而後用雙指針分別取出頭尾指針.函數 2. 至關於耍賴用數組轉化鏈表.指針 /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL
相關文章
相關標籤/搜索