The Trade Desk Interview Question

Skyline problem [leetcode hard question]