排序
文章平均质量分 81
LQCUN
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
451. Sort Characters By Frequency
Given a string, sort it in decreasing order based on the frequency of characters.Example 1:Input:"tree"Output:"eert"Explanation:'e' appears twice while 'r' and 't' both appear once.So 'e' must...原创 2018-02-11 13:28:27 · 126 阅读 · 0 评论 -
406. Queue Reconstruction by Height
Suppose you have a random list of people standing in a queue. Each person is described by a pair of integers(h, k), where h is the height of the person and k is the number of people in front of this原创 2018-02-06 19:16:02 · 142 阅读 · 0 评论 -
347. Top K Frequent Elements
Given a non-empty array of integers, return the k most frequent elements.For example,Given [1,1,1,2,2,3] and k = 2, return [1,2].Note: You may assume k is always valid, 1 ≤ k ≤ number of unique elemen...原创 2018-02-12 13:42:20 · 127 阅读 · 0 评论 -
506. Relative Ranks
Given scores of N athletes, find their relative ranks and the people with the top three highest scores, who will be awarded medals: "Gold Medal", "Silver Medal" and "Bronze Medal".Example 1:Input: [5,...原创 2018-02-19 10:22:25 · 130 阅读 · 0 评论 -
216. Combination Sum III
Find all possible combinations of k numbers that add up to a number n, given that only numbers from 1 to 9 can be used and each combination should be a unique set of numbers. Example 1:Input: k = 3, ...原创 2018-02-20 00:05:42 · 152 阅读 · 0 评论 -
46. Permutations
Given a collection of distinct numbers, return all possible permutations.For example,[1,2,3] have the following permutations:[ [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], [3,2,1]]思路:递归。...转载 2018-02-20 00:28:47 · 139 阅读 · 0 评论 -
378. Kth Smallest Element in a Sorted Matrix
Given a n x n matrix where each of the rows and columns are sorted in ascending order, find the kth smallest element in the matrix.Note that it is the kth smallest element in the sorted order, not the...原创 2018-02-22 13:59:41 · 150 阅读 · 0 评论
分享