
Heap
文章平均质量分 80
dyllanzhou
这个作者很懒,什么都没留下…
展开
-
[Leetcode]Kth Largest Element in an Array
Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element. For example, Given [3,2,1,5,6,4] and k = 2, return 5. N原创 2015-08-27 15:37:54 · 255 阅读 · 0 评论 -
[Leetcode]Ugly Number II
Write a program to find the n-th ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 1, 2, 3, 4, 5, 6, 8, 9, 10, 12 is the sequence of the first 10原创 2015-11-10 23:10:32 · 252 阅读 · 0 评论