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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What points are you interested in the skyline problem?

A

A point at every new height.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How does the merge-sort algorithm work?

A
  1. Choose the key points to the left.
  2. If its height is less than the height of the previous keypoint (for iteration 2 and on) update it to the same height.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly