
Sort
weixin_39145266
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
56 Merge Intervals
1 题目Given a collection of intervals, merge all overlapping intervals.Example 1:Input: [[1,3],[2,6],[8,10],[15,18]]Output: [[1,6],[8,10],[15,18]]Explanation: Since intervals [1,3] and [2,6] ov...原创 2019-03-29 09:17:13 · 71 阅读 · 0 评论 -
75 Sort Colors
1 题目Given an array withnobjects colored red, white or blue, sort themin-placeso that objects of the same color are adjacent, with the colors in the order red, white and blue.Here, we will use ...原创 2019-03-29 09:17:19 · 131 阅读 · 0 评论 -
274 H-Index
1 题目Given an array of citations (each citation is a non-negative integer) of a researcher, write a function to compute the researcher's h-index.According to thedefinition of h-index on Wikipedia:...原创 2019-04-04 23:50:29 · 153 阅读 · 0 评论 -
147 Insertion Sort List
1 题目Sort a linked list using insertion sort.A graphical example of insertion sort. The partial sorted list (black) initially contains only the first element in the list.With each iteration on...原创 2019-04-22 12:49:12 · 118 阅读 · 0 评论 -
148 Sort List
1 题目Sort a linked list in O(n log n) time using constant space complexity.Example 1:Input: 4->2->1->3Output: 1->2->3->4Example 2:Input: -1->5->3->4->0Output: ...原创 2019-04-22 13:32:11 · 76 阅读 · 0 评论 -
179 Largest Number
1 题目Given a list of non negative integers, arrange them such that they form the largest number.Example 1:Input: [10,2]Output: "210"Example 2:Input: [3,30,34,5,9]Output: "9534330"Note: T...原创 2019-04-23 15:51:07 · 107 阅读 · 0 评论 -
324 Wiggle Sort II
1 题目Given an unsorted arraynums, reorder it such thatnums[0] < nums[1] > nums[2] < nums[3]....Example 1:Input: nums = [1, 5, 1, 1, 6, 4]Output: One possible answer is [1, 4, 1, 5, 1...原创 2019-07-07 15:39:11 · 83 阅读 · 0 评论