sort
文章平均质量分 77
小榕流光
这个作者很懒,什么都没留下…
展开
-
[leetcode] 75. Sort Colors 解题报告
题目链接:https://leetcode.com/problems/sort-colors/Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order re原创 2015-12-30 17:30:15 · 632 阅读 · 0 评论 -
[leetcode] 252. Meeting Rooms 解题报告
题目链接:https://leetcode.com/problems/meeting-rooms/Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],...] (si < ei), determine if a person could attend原创 2016-02-26 16:03:10 · 3349 阅读 · 0 评论 -
[leetcode] 179. Largest Number 解题报告
题目链接:https://leetcode.com/problems/largest-number/Given a list of non negative integers, arrange them such that they form the largest number.For example, given [3, 30, 34, 5, 9], the largest原创 2016-02-04 07:03:30 · 834 阅读 · 0 评论 -
[leetcode] 280. Wiggle Sort 解题报告
题目链接: https://leetcode.com/problems/wiggle-sort/Given an unsorted array nums, reorder it in-place such that nums[0] = nums[2] .For example, given nums = [3, 5, 2, 1, 6, 4], one possible an原创 2016-03-13 03:29:12 · 1992 阅读 · 0 评论 -
[leetcode] 1. Two Sum 解题报告
题目链接:https://leetcode.com/problems/two-sum/Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two原创 2015-12-26 09:45:24 · 523 阅读 · 0 评论 -
[leetcode] 274. H-Index 解题报告
题目链接:https://leetcode.com/problems/h-index/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.Accordi原创 2016-03-05 07:12:59 · 1633 阅读 · 0 评论 -
[leetcode] 253. Meeting Rooms II 解题报告
题目链接:https://leetcode.com/problems/meeting-rooms-ii/Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],...] (si < ei), find the minimum number of confe原创 2016-02-29 04:37:13 · 6387 阅读 · 0 评论 -
[leetcode] 296. Best Meeting Point 解题报告
题目链接:https://leetcode.com/problems/best-meeting-point/A group of two or more people wants to meet and minimize the total travel distance. You are given a 2D grid of values 0 or 1, where each 1 m原创 2016-03-14 12:52:20 · 1658 阅读 · 0 评论 -
[leetcode] 164. Maximum Gap 解题报告
题目链接:https://leetcode.com/problems/maximum-gap/Given an unsorted array, find the maximum difference between the successive elements in its sorted form.Try to solve it in linear time/space.原创 2016-05-11 10:50:12 · 1322 阅读 · 0 评论 -
[leetcode] 324. Wiggle Sort II 解题报告
题目链接:https://leetcode.com/problems/wiggle-sort-ii/Given an unsorted array nums, reorder it such that nums[0] nums[2] .Example:(1) Given nums = [1, 5, 1, 1, 6, 4], one possible answer is原创 2016-05-07 12:17:59 · 12939 阅读 · 0 评论