摘要:
1.归 ListNode* sortList(ListNode* head) { if (head == nullptr || head->next == nullptr) return head; // 1.将待排序序列分为两部分 ListNode* pre = nullptr, *slow = 阅读全文
posted @ 2020-02-07 22:36
强威
阅读(242)
评论(0)
推荐(0)
摘要:
Sort a linked list in O(n log n) time using constant space complexity. Example 1: Input: 4->2->1->3 Output: 1->2->3->4 Example 2: Input: -1->5->3->4-> 阅读全文
posted @ 2020-02-07 22:17
强威
阅读(170)
评论(0)
推荐(0)