Each building is [left, right, height]: it stands on the ground from left up to, but not including, right. Return the outline of all the buildings as a list of key points [x, height] sorted by x.
- A key point is the left end of a flat stretch of the outline; the last key point has height
0 - Two neighbouring stretches of the same height are one stretch: do not report a key point between them
- Every building is wider than zero, and the input is not sorted
- Coordinates can be as large as
231 - 1, so the width of the range cannot be used as a cost - Do not change the input; no buildings gives
[] - Target: O(n log n)