leetcode_218. The Skyline Problem ? 待解决

来源:互联网 发布:五线胆码的算法 编辑:程序博客网 时间:2024/06/05 04:13

218 The Skyline Problem

A city’s skyline is the outer contour of the silhouette formed by all the buildings in that city when viewed from a distance. Now suppose you are given the locations and height of all the buildings as shown on a cityscape photo (Figure A), write a program to output the skyline formed by these buildings collectively (Figure B).

提示:提交代码后,需要用简洁的语言解释一下代码思路~ 谢谢

历史题目和总结见公众号「每日一道算法题」

https://leetcode.com/problems/the-skyline-problem/description/

思路: