[LeetCode] 223. Rectangle Area

1 · Rain Hu · Nov. 17, 2022, 1:34 p.m.
Summary
223. Rectangle Area Hardness: \(\color{orange}\textsf{Medium}\) Ralated Topics: Math、Geometry 一、題目 Given the coordinates of two rectilinear rectangles in a 2D plane, return the total area covered by the two rectangles. The first rectangle is defined by its bottom-left corner (ax1, ay1) and its top-right corner (ax2, ay2). The second rectangle is defined by its bottom-left corner (bx1, by1) and tis top-right corner (bx2, by2). Example 1: Input: ax1 = -3, ay1 = 0, ax2 = 3, ay2 = 4, bx1 = 0, by1 = ...