
Heap
iteye_17352
这个作者很懒,什么都没留下…
展开
-
Leetcode - Sliding Window Maximum
Given an array nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each time the sliding window m...原创 2015-07-23 09:18:03 · 112 阅读 · 0 评论 -
Leetcode - The Skyline Problem
[分析]思路1参考[url]https://leetcode.com/discuss/44537/my-java-ac-code-with-priorityqueues[/url]记录下目前的理解:目标是求出所有拐点。所谓拐点是指让当前x坐标高度发生变化的点,当前x坐标的高度是x处所有楼房的最大高度。所有楼房的左右两顶点加入到考察集合,排序该集合,排序后使用最大堆来保存当前的楼高状态,遍历...原创 2015-09-04 19:09:42 · 135 阅读 · 0 评论