C++ | Easiest Explanation with comments
Complexity\n- Time complexity: O(n^2)\n\n- Space complexity: O(1)\n\n# Code\n\nclass Solution {\npublic:\n    long long largestSquareArea(vector<vector<int>>& B
# Complexity\n- Time complexity: O(n^2)\n\n- Space complexity: O(1)\n\n# Code\n```\nclass Solution {\npublic:\n    long long largestSquareArea(vector<vector<int>>& BottomLeft, vector<vector<int>>& topRight) {\n        int max_len = 0;\n        for(int i=0 ; i<BottomLeft.size() ; i++){\n            for(int j=i+1 ; j<BottomLeft.size() ; j++){\n                // Condition for being overlapping\n                if((topRight[i][0] > BottomLeft[j][0]) && (topRight[i][1] > BottomLeft[j][1])){ \n                    // Finding y-coordinate\'s length in overlapping rectangle\n                    int mini_y = min(topRight[i][1],topRight[j][1]);\n                    int maxi_y = max(BottomLeft[i][1], BottomLeft[j][1]);\n                    int y_length = mini_y - maxi_y;\n                    // Finding y-coordinate\'s length in overlapping rectangle\n                    int mini_x = min(topRight[i][0],topRight[j][0]);\n                    int maxi_x = max(BottomLeft[i][0],BottomLeft[j][0]);\n                    int x_length = mini_x - maxi_x;\n                    // As we have to make square, so it is possible only by minimum length of x and y lengths\n                    int len = min(x_length,y_length);\n                    max_len = max(max_len, len);\n                }\n            }\n        }\n        return (long long int)((long long int)max_len * (long long int)max_len);\n    }\n};\n```
['Array', 'Math', 'Geometry', 'C++']