🔥Find Overlap and Minimum | Clean Code | C++ |
Code\n\nclass Solution {\npublic:\n    long long largestSquareArea(vector<vector<int>>& bottomLeft, vector<vector<int>>& topRight) {\n        int n = bottomLeft
# Code\n```\nclass Solution {\npublic:\n    long long largestSquareArea(vector<vector<int>>& bottomLeft, vector<vector<int>>& topRight) {\n        int n = bottomLeft.size();\n        long long maxArea = 0;\n        \n        for (int i = 0; i < n; i++) \n        {\n            for (int j = i + 1; j < n; j++) \n            {\n                int x1 = max(bottomLeft[i][0], bottomLeft[j][0]);\n                int y1 = max(bottomLeft[i][1], bottomLeft[j][1]);\n                int x2 = min(topRight[i][0], topRight[j][0]);\n                int y2 = min(topRight[i][1], topRight[j][1]);\n                \n                if (x1 < x2 && y1 < y2) \n                {\n                    long long side = min(x2 - x1, y2 - y1);\n                    \n                    maxArea = max(maxArea, side * side);\n                }\n            }\n        }\n        \n        return maxArea;\n    }\n};\n```
['C++']