We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 69116ae commit bcac4d7Copy full SHA for bcac4d7
0836.矩形重叠/0836-矩形重叠.py
@@ -0,0 +1,10 @@
1
+class Solution(object):
2
+ def isRectangleOverlap(self, rec1, rec2):
3
+ """
4
+ :type rec1: List[int]
5
+ :type rec2: List[int]
6
+ :rtype: bool
7
8
+ x1, y1, x2, y2 = rec1
9
+ x3, y3, x4, y4 = rec2
10
+ return (x3 - x2) * (x4 - x1) < 0 and (y3 - y2) * (y4 - y1) < 0
0 commit comments