C++ || Solution with diagram and easy explanation || 4 LInes
EASIEST EXPLANATION: \n \n\t\t Case-1: Rec2 intersects with Rec1 on top right corner\n\n               ____x4,y4\n              |                   |\n       _|
EASIEST EXPLANATION: \n \n\t\t Case-1: Rec2 intersects with Rec1 on top right corner\n\n               ____________________x4,y4\n              |                   |\n       _______|______x2,y2        |\n      |       |______|____________|\n      |      x3,y3   |\n      |______________|\n     x1,y1\n              \n     Case-2: Rec2 intersects with Rec1 on top left corner\n       ___________________  x4,y4\n      |                   |\n      |            _______|____________x2,y2\n      |___________|_______|           |\n    x3,y3         |                   | \n                  |___________________|\n                x1,y1\n\n     Case-3: Rec2 intersects with Rec1 on bottom left corner\n     \n               ____________________x2,y2\n              |                   |\n       _______|______x4,y4        |\n      |       |______|____________|\n      |      x1,y1   |\n      |______________|\n     x3,y3\n              \n     Case-4: Rec2 intersects with Rec1 on bottom right corner\n     \n       ___________________  x2,y2\n      |                   |\n      |            _______|____________x4,y4\n      |___________|_______|           |\n    x1,y1         |                   | \n                  |___________________|\n                x3,y3\n\t\t\t\t\nCode: \n```\nclass Solution {\npublic:\n    bool isRectangleOverlap(vector<int>& rec1, vector<int>& rec2) {\n        int x1 = rec1[0], y1 = rec1[1], x2 = rec1[2], y2 = rec1[3];\n\t    int x3 = rec2[0], y3 = rec2[1], x4 = rec2[2], y4 = rec2[3];\n        \n        if(y2<=y3 || x4<=x1 || y4<=y1 || x2<=x3) {\n            return false;\n        }\n        else return true;\n\t}\n};
['C']