Skyline Problem

Given n houses on the ground with each house represented by rectangle. The ith rectangle is represented as [start_i, end_i, height_i]. (column). where 0 <= i <= n; The rectangles may overlap with each other. How can we calculate the total area that these rectangles cover?

eg. <1,3,1> <2,4,2>

output = 5

results matching ""

    No results matching ""