C++ EASY Soln Beats 100% 0ms
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:O(1)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    bool isRectangleOverlap(vector<int>& rec1, vector<int>& rec2) {\n\n        int x1=rec1[0];\n        int y1=rec1[1];\n        int x2=rec1[2];\n        int y2=rec1[3];\n\n        int a1=rec2[0];\n        int b1=rec2[1];\n        int a2=rec2[2];\n        int b2=rec2[3];\n        \n        if(a1>=x2 || a2<=x1 || b2<=y1 || b1>=y2 )\n          return false;\n        else\n          return true;\n    }\n};\n```
['C++']