problem
solution:
class Solution { public: bool isRectangleOverlap(vector<int>& rec1, vector<int>& rec2) { return rec1[0]<rec2[2] && rec1[2]>rec2[0] && rec1[1]<rec2[3] && rec1[3]>rec2[1]; } };
参考
1. Leetcode_easy_836. Rectangle Overlap;
2. grandyang;
完