目录

力扣218. 天际线问题

力扣218. The Skyline Problem(天际线问题)

给定建筑物的位置和高度,返回由这些建筑物形成的天际线。

示例 1:

../posts/01_学习/87_LeetCode/0218_天际线问题/img/0218-1-description.png

输入:buildings = [[2,9,10],[3,7,15],[5,12,12],[15,20,10],[19,24,8]]
输出:[[2,10],[3,15],[7,12],[12,0],[15,10],[20,8],[24,0]]

提示:

  • 1 <= buildings.length <= 10^4
  • 0 <= lefti < righti <= 2^31 - 1
  • 1 <= heighti <= 2^31 - 1