摘要: https://leetcode.com/problems/sort-list/description/Sort a linked list in O(n log n) time using constant space complexity.找到中点之后的处理,和 143 "Reorder List" 是一样的 : 然后把tail 传后面去 ListNode tail = mid.next ;/... 阅读全文
posted @ 2018-02-26 06:19 davidnyc 阅读(167) 评论(0) 推荐(0)
摘要: https://leetcode.com/problems/intersection-of-two-arrays/description/Given two arrays, write a function to compute their intersection.Example:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2].Not... 阅读全文
posted @ 2018-02-26 01:33 davidnyc 阅读(161) 评论(0) 推荐(0)