Skip to content

Commit bcac4d7

Browse files
committedMar 18, 2020
2020-03-18
1 parent 69116ae commit bcac4d7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
 
+10
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)