
Sort
ljffdream
这个作者很懒,什么都没留下…
展开
-
【Leetcode】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 red, white and blue. Here, we will use the原创 2014-12-07 10:20:07 · 355 阅读 · 0 评论 -
【LeetCode】Majority Numbers
【题目】 Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You may assume that the array is non-empty and the majorit原创 2014-12-24 10:22:30 · 316 阅读 · 0 评论 -
【Leetcode】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 formed number is 9534330. Note: The result may转载 2015-08-03 21:38:34 · 297 阅读 · 0 评论 -
【Leetcode】Merge intervals
【题目】 Given a collection ofintervals, merge all overlapping intervals. For example, Given [1,3],[2,6],[8,10],[15,18], return [1,6],[8,10],[15,18]. 【思路】 思路就是,先对进来的这一个list 的inteval进行比较,排序,排序的时候转载 2015-08-31 22:31:50 · 258 阅读 · 0 评论 -
[Leetcode]sort Color
[timu] Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adja转载 2015-09-02 03:55:21 · 271 阅读 · 0 评论