
合并
文章平均质量分 71
jmspan
这个作者很懒,什么都没留下…
展开
-
LeetCode 143. Reorder List(重组链表)
原题网址:https://leetcode.com/problems/reorder-list/Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…You must do this in-place without altering the nodes' va原创 2016-05-26 02:08:26 · 1589 阅读 · 0 评论 -
LeetCode 305. Number of Islands II(小岛)
原题网址:https://leetcode.com/problems/number-of-islands-ii/A 2d grid map of m rows and n columns is initially filled with water. We may perform an addLand operation which turns the water at posit原创 2016-04-19 13:13:25 · 3629 阅读 · 0 评论 -
LeetCode 228. Summary Ranges(归纳区间)
原题网址:https://leetcode.com/problems/summary-ranges/Given a sorted integer array without duplicates, return the summary of its ranges.For example, given [0,1,2,4,5,7], return ["0->2","4->5","7原创 2016-04-05 05:02:40 · 817 阅读 · 0 评论 -
LeetCode 21. Merge Two Sorted Lists(合并链表)
原题网址:https://leetcode.com/problems/merge-two-sorted-lists/Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lis原创 2016-05-19 07:11:07 · 390 阅读 · 0 评论 -
LeetCode 23. Merge k Sorted Lists(K路合并)
原题网址:https://leetcode.com/problems/merge-k-sorted-lists/Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.方法:使用最小堆维护当前最小值。/** * Definition fo原创 2016-05-19 07:27:17 · 866 阅读 · 0 评论 -
LeetCode 56. Merge Intervals(合并区间)
原题网址:https://leetcode.com/problems/merge-intervals/Given a collection of intervals, merge all overlapping intervals.For example,Given [1,3],[2,6],[8,10],[15,18],return [1,6],[8,10],[15,1原创 2016-05-21 07:14:22 · 664 阅读 · 0 评论 -
LeetCode 57. Insert Interval(插入区间)
原题网址:https://leetcode.com/problems/insert-interval/Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals w原创 2016-05-21 07:40:48 · 514 阅读 · 0 评论 -
LeetCode 88. Merge Sorted Array(合并有序数组)
原题网址:https://leetcode.com/problems/merge-sorted-array/Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.Note:You may assume that nums1 has enough原创 2016-05-23 00:34:29 · 371 阅读 · 0 评论