LeetCode – The Skyline Problem (Java)
Analysis This problem is essentially a problem of processing 2*n edges. Each edge has a x-axis value and a height value. The key part is how to use the height heap to process each edge. Java Solution class Edge { int x; int height; boolean isStart; public Edge(int x, int height, boolean isStart) { … Read more