Simple and Easy Solution || Concise code || Intuitive
Instead of trying to find whether the rectangles intersect, here we find whether they not intersect.\n\n# Code\n\nclass Solution {\n    public boolean isRectang
Instead of trying to find whether the rectangles intersect, here we find whether they not intersect.\n\n# Code\n```\nclass Solution {\n    public boolean isRectangleOverlap(int[] rec1, int[] rec2) {\n        return isSideIntersect(rec1, rec2) && isTopIntersect(rec1, rec2);\n    }\n\n    private boolean isSideIntersect(int[] rec1, int[] rec2) {\n        if(rec1[2] <= rec2[0] || rec1[0] >= rec2[2])\n            return false;\n        return true;\n    }\n\n    private boolean isTopIntersect(int[] rec1, int[] rec2) {\n        if(rec1[1] >= rec2[3] || rec1[3] <= rec2[1])\n            return false;\n        return true;\n    }\n}\n```
['Array', 'Math', 'Java']