![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
heap
伊萨卡钢琴家
这个作者很懒,什么都没留下…
展开
-
Leetcode 215. 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原创 2016-01-23 05:40:50 · 297 阅读 · 0 评论 -
Leetcode 295. Find Median from Data Stream
Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two middle value. Examples: [2,3,4] , the median原创 2016-01-23 06:00:11 · 289 阅读 · 0 评论 -
基本数据结构-heap实现
//This is to implment the heap structure.public class heap{ int[] array; //This is to record the position now we should add the element to int currPosition = 1; //the length of the heap int原创 2016-02-07 08:04:19 · 346 阅读 · 0 评论