223 Rectangle Area
223. Rectangle Area
1. Question
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 never beyond the maximum possible value of int.
2. Implementation
3. Time & Space Complexity
时间复杂度: O(1), 空间复杂度: O(1)
Last updated