Skyline Problem Flashcards
1
Q
What is meant by the skyline problem
A
To find the outer contours of some overlapping or non-overlapping staples/skylines.
2
Q
What points are you interested in the skyline problem?
A
A point at every new height.
3
Q
Given n buildings, what is the running time of an algorithm marking each upper-left and lower-right corner, then adjusting corners overlapping with other buildings, then removing redundant key points (at the same height.)
A
O(n^2) as we need to calculate two points for each building.
4
Q
How does the merge-sort algorithm work?
A
- Choose the key points to the left.
- If its height is less than the height of the previous keypoint (for iteration 2 and on) update it to the same height.