Pragmatic Play interview question

Leetcode Hard, The skyline problem.