[C++] basic solution with full explanation (using image)
Do checkout the attached image for better understanding.\nIf you really found my solution helpful please upvote it, as it motivates me to post such kind of code
*Do checkout the attached image for better understanding.*\n**If you really found my solution helpful please upvote it, as it motivates me to post such kind of codes and help the coding community, if you have some queries or some improvements please feel free to comment and share your views.**\n\nHere is my approach:\nI am finding out the cases in which the rectangles are **not overlapping** and then excluding them, by returning `false`. And in all other cases obviously, the rectangles would overlap.\n\nIt\'s mentioned in the question that:\n*To be clear, two rectangles that only touch at the corner or edges do not overlap.* \nHence, I have used an equality sign in the `if` condition, to exclude the non-overlapping rectangles.\n\nCoordinates of rectangle: [x1, y1, x2, y2]\nIndex corresponding to it: [0,  1,   2,   3]\n\n![image](https://assets.leetcode.com/users/images/f65e9348-70a0-465f-9a9a-64864d611f2c_1643786238.9383483.png)\n\n\n\n```\nclass Solution {\npublic:\n    bool isRectangleOverlap(vector<int>& rec1, vector<int>& rec2) \n    {\n        //for not overlapping on y-axis\n        if(rec2[1]>=rec1[3] || rec1[1]>=rec2[3])\n            return false;\n\t\t\n        //for not overlapping on x-axis\n        if(rec1[2]<=rec2[0] || rec2[2]<=rec1[0])\n            return false;\n        \n    return true;\n    }\n};\n```\n\n **If you have some queries or some improvements please feel free to comment and share your views.**
['C', 'Sorting']