Submission Result: Wrong Answer More Details
- Rectangle Area My Submissions QuestionEditorial Solution
Total Accepted: 40654 Total Submissions: 133524 Difficulty: Easy
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.
Why is the expected output "4"?
@BryanBo.Cao It is the total area covered by the two rectangles. You can think it as a union of two rectangles area, not intersection.
@1337c0d3r Thanks! Got it!
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.