LeetCode-Sort List
摘要:
这题的时间复杂度要求是O(n logn),很容易想到用mergeSort来解。 其中值得注意的是, 1.在merge function里dummy前置节点和tail的作用, 2.以及findMin里ListNode fast = head.next的作用, 3.sortList中mid.next = 阅读全文
posted @ 2015-03-09 23:13 IncredibleThings 阅读(90) 评论(0) 推荐(0) 编辑