The Trade Desk interview question

straight from leetcode hard section: skyline problem