LeetCode 218. The Skyline Problem

Calculate the building in lines not by the whole building.