Niantic interview question

Skyline problem