The Trade Desk interview question

Skyline problem [leetcode hard question]