C++ beats %100 6 lines general enough to solve all intersection 1-d or 2-d overlap problems
If two rectanges have some overlap, there must be overlap horizontally and vertically. So just check two dimensions. For any dimension, it is like checking if t
If two rectanges have some overlap, there must be overlap horizontally and vertically. So just check two dimensions. For any dimension, it is like checking if two intervals have intersection. \n```C++\nclass Solution {\npublic:\n    bool isRectangleOverlap(vector<int>& rec1, vector<int>& rec2) {\n\t // check horizontally, must have some overlap  \n        int max_start = max(rec1[0], rec2[0]);\n        int min_end = min(rec1[2], rec2[2]);\n        if (min_end - max_start <= 0) return false;\n\t// check vertically, must have some overlap\n        int min_start = min(rec1[3], rec2[3]);\n        int max_end = max(rec1[1],rec2[1]);\n        return min_start - max_end >0;\n    }\n};\n```
['C']