
mergesort
sysu_xiamengyou
这个作者很懒,什么都没留下…
展开
-
[LeetCode OJ]Merge k Sorted Lists
【问题描述】Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.问题来源:Merge k Sorted Lists【解题分析】将k个有序的数组合并成一个有序的数组,将其分而治之,每次只比较两个数组,简易图为:原创 2017-03-09 21:46:32 · 311 阅读 · 0 评论 -
七、[LeetCode OJ]Median of Two Sorted Arrays
【问题描述】There are two sorted arrays nums1 and nums2 of size m and n respectively.Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).Example 1:原创 2017-03-07 21:09:50 · 329 阅读 · 0 评论