We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 836bd0b commit 4da0bfaCopy full SHA for 4da0bfa
README.md
@@ -10,6 +10,8 @@ leetcode 测试
10
11
##### 包含的内容如下
12
13
+https://leetcode.cn/problems/rectangle-overlap/
14
+
15
https://leetcode.cn/problems/design-an-expression-tree-with-evaluate-function/
16
17
https://leetcode.cn/problems/find-positive-integer-solution-for-a-given-equation/
rectangle-overlap/index.ts
@@ -0,0 +1,9 @@
1
+export default function isRectangleOverlap(
2
+ rec1: number[],
3
+ rec2: number[]
4
+): boolean {
5
+ return (
6
+ Math.min(rec1[2], rec2[2]) > Math.max(rec1[0], rec2[0]) &&
7
+ Math.min(rec1[3], rec2[3]) > Math.max(rec1[1], rec2[1])
8
+ );
9
+}
0 commit comments