0ms | Easy to understand with explanation | Java solution
java\n// AC: Runtime: 0 ms, faster than 100.00% of Java online submissions for Rectangle Overlap.\n// Memory Usage: 35.8 MB, less than 98.52% of Java online sub
```java\n// AC: Runtime: 0 ms, faster than 100.00% of Java online submissions for Rectangle Overlap.\n// Memory Usage: 35.8 MB, less than 98.52% of Java online submissions for Rectangle Overlap.\n// see the notation.\n// T:O(1), S:O(1)\n// \nclass Solution {\n    public boolean isRectangleOverlap(int[] rec1, int[] rec2) {\n        int x11 = rec1[0], y11 = rec1[1], x12 = rec1[2], y12 = rec1[3];\n        int x21 = rec2[0], y21 = rec2[1], x22 = rec2[2], y22 = rec2[3];\n        // become a line or point, return false\n        if ((x11 == x12 || y11 == y12 || x21 == x22 || y21 == y22)) {\n            return false;\n        }\n        // x-axios do not overlap\n        if (x21 >= x12 || x11 >= x22) {\n            return false;\n        }\n\n        // y-axios do not overlap\n        if (y21 >= y12 || y11 >= y22) {\n            return false;\n        }\n\n        return true;\n    }\n}\n```
['Java']