0 ms  C++ solution along with invalid testcases check
\n\nclass Solution {\npublic:\n    bool isRectangleOverlap(vector<int>& rec1, vector<int>& rec2) {\n\t//check for invalid test cases\n        if(rec2[0] == rec2
\n```\nclass Solution {\npublic:\n    bool isRectangleOverlap(vector<int>& rec1, vector<int>& rec2) {\n\t//check for invalid test cases\n        if(rec2[0] == rec2[2] || rec1[1] == rec1[3] || rec2[1] == rec2[3] || rec1[0] == rec1[2]){return false;}\n   //check for don\'t overlap condition\n        if(rec1[2] <= rec2[0] || rec1[1] >= rec2[3] || rec1[0] >= rec2[2] || rec2[1] >= rec1[3]){\n            return false;\n        }\n        //otherwise overlap\n        return true;\n    }\n};\n```
[]