Super Simple || C++
Code\n\nclass Solution \n{\npublic:\n    long long largestSquareArea(vector<vector<int>>& bottomLeft, vector<vector<int>>& topRight) \n    {\n        int n=bott
# Code\n```\nclass Solution \n{\npublic:\n    long long largestSquareArea(vector<vector<int>>& bottomLeft, vector<vector<int>>& topRight) \n    {\n        int n=bottomLeft.size();\n        long long ans=0;\n        vector<vector<int>> p(n);\n        for(int x=0; x<n; x++)\n        {\n            p[x].push_back(bottomLeft[x][0]); // 0\n            p[x].push_back(bottomLeft[x][1]); // 1\n            p[x].push_back(topRight[x][0]); // 2\n            p[x].push_back(topRight[x][1]); // 3\n        }\n        sort(p.begin(),p.end());\n        for(int x=0; x<n-1; x++)\n        {\n            for(int y=x+1; y<n; y++)\n            {\n                if(!(p[x][2]<=p[y][0] || p[x][3]<=p[y][1] || p[x][1]>=p[y][3])) // overlap\n                {\n                    int a=max(p[x][0],p[y][0]);\n                    int b=min(p[x][2],p[y][2]);\n                    int c=max(p[x][1],p[y][1]);\n                    int d=min(p[x][3],p[y][3]);\n                    long long side=min(b-a,d-c);\n                    ans=max(ans,side*side);\n                }\n            }\n        }\n        return ans;\n    }\n};\n```
['C++']