Find the total area covered by two rectilinear rectangles in a 2D plane. Each rectangle is defined by its bottom left corner and top right corner as shown in the figure. Assume that the total area is ...
The idea is similar to what we did in the Max Histogram, but we want to construct a level wise one. Refer the diagrams.