Java 100% faster explained
\nclass Solution {\n    public boolean isRectangleOverlap(int[] rect1, int[] rect2) {\n        // if any one of the given rectangle is a line the we will not ge
```\nclass Solution {\n    public boolean isRectangleOverlap(int[] rect1, int[] rect2) {\n        // if any one of the given rectangle is a line the we will not get any operlapping area\n        // so we will return false\n        if(rect1[0]==rect1[2]||rect1[1]==rect1[3]||rect2[0]==rect2[2]||rect2[1]==rect2[3]){\n            return false;\n        }\n        // condition one is when the (co-ordinates) of top right corner of rect2 are greater \n        // than the bootom left coordinates of rect1\n        boolean one=(rect1[0]<rect2[2] && rect1[1]<rect2[3]);\n        // condition one is when the (co-ordinates) of top right corner of rect1 are greater \n        // than the bootom left coordinates of rect2\n        boolean two=(rect1[2]>rect2[0] && rect1[3]>rect2[1]);\n        // ans will be only true if and onliy if these two conditions are satisfied\n        return one&&two;\n    }\n}\n```
[]